Finalny plan
This commit is contained in:
parent
10662d2b44
commit
b0853ed5c0
17
.htaccess
Normal file
17
.htaccess
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
AuthBasicAuthoritative Off
|
||||||
|
AuthUserFile /dev/null
|
||||||
|
AuthMySQL On
|
||||||
|
AuthMySQL_Host localhost
|
||||||
|
AuthMySQL_User auth
|
||||||
|
AuthMySQL_Password haslo
|
||||||
|
AuthMySQL_DB authorize
|
||||||
|
AuthMySQL_Password_Table users
|
||||||
|
AuthMySQL_Username_Field login
|
||||||
|
AuthMySQL_Password_Field password
|
||||||
|
AuthMySQL_Empty_Passwords Off
|
||||||
|
AuthMySQL_Encryption_Types SHA1Sum
|
||||||
|
AuthMySQL_Authoritative On
|
||||||
|
|
||||||
|
AuthType Basic
|
||||||
|
AuthName "Autoryzacja"
|
||||||
|
Require valid-user
|
2
app.js
2
app.js
@ -50,7 +50,7 @@ app.post('/auth', function(request, response) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/home.html', function(request, response) {
|
app.get('/home', function(request, response) {
|
||||||
if (request.session.loggedin) {
|
if (request.session.loggedin) {
|
||||||
response.send('Witaj, ' + request.session.username + '!');
|
response.send('Witaj, ' + request.session.username + '!');
|
||||||
} else {
|
} else {
|
||||||
|
17
public/.htaccess
Normal file
17
public/.htaccess
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
AuthBasicAuthoritative Off
|
||||||
|
AuthUserFile /dev/null
|
||||||
|
AuthMySQL On
|
||||||
|
AuthMySQL_Host localhost
|
||||||
|
AuthMySQL_User auth
|
||||||
|
AuthMySQL_Password haslo
|
||||||
|
AuthMySQL_DB authorize
|
||||||
|
AuthMySQL_Password_Table users
|
||||||
|
AuthMySQL_Username_Field login
|
||||||
|
AuthMySQL_Password_Field password
|
||||||
|
AuthMySQL_Empty_Passwords Off
|
||||||
|
AuthMySQL_Encryption_Types SHA1Sum
|
||||||
|
AuthMySQL_Authoritative On
|
||||||
|
|
||||||
|
AuthType Basic
|
||||||
|
AuthName "Autoryzacja"
|
||||||
|
Require valid-user
|
Loading…
Reference in New Issue
Block a user