From 0595619d392bd88ed9bf26595f6fbee7f5d76d83 Mon Sep 17 00:00:00 2001 From: Skeeve Date: Mon, 31 Mar 2014 08:58:13 +0200 Subject: [PATCH] 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 --- core/modules/commands/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;