mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +00:00
Show site title when logging in
I have several TW5 servers running on the same host and think it would be good, would the password prompt display the $:/SiteTitle
This commit is contained in:
parent
776c9a2cad
commit
0595619d39
@ -95,8 +95,9 @@ SimpleServer.prototype.listen = function(port,host) {
|
|||||||
if(username && password) {
|
if(username && password) {
|
||||||
// Check they match
|
// Check they match
|
||||||
if(self.checkCredentials(request,username,password) !== "ALLOWED") {
|
if(self.checkCredentials(request,username,password) !== "ALLOWED") {
|
||||||
|
var servername = state.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5";
|
||||||
response.writeHead(401,"Authentication required",{
|
response.writeHead(401,"Authentication required",{
|
||||||
"WWW-Authenticate": 'Basic realm="Please provide your username and password to login to TiddlyWiki5"'
|
"WWW-Authenticate": 'Basic realm="Please provide your username and password to login to ' + servername + '"'
|
||||||
});
|
});
|
||||||
response.end();
|
response.end();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user