1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Merge pull request #514 from Skeeve/patch-6

Show site title when logging in
This commit is contained in:
Jeremy Ruston 2014-03-31 12:59:15 +01:00
commit 0d0679de1b

View File

@ -95,8 +95,9 @@ SimpleServer.prototype.listen = function(port,host) {
if(username && password) {
// Check they match
if(self.checkCredentials(request,username,password) !== "ALLOWED") {
var servername = state.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5";
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();
return;