diff --git a/core/modules/commands/server.js b/core/modules/commands/server.js index 820aab071..c0f495117 100644 --- a/core/modules/commands/server.js +++ b/core/modules/commands/server.js @@ -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;