Skip to content

Commit

Permalink
Modify busy landing page option (OpenUserJS#2040)
Browse files Browse the repository at this point in the history
* Give a custom message. Will be needing this on an upcoming server migration. Letsencrypt hasn't ever been transferred to a new server and not sure how it will react... so keep us FORCEd BUSY.

Post OpenUserJS#947

Auto-merge
  • Loading branch information
Martii authored Jul 15, 2024
1 parent 6b1851c commit 52e2251
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ var maxMem = ensureIntegerOrNull(process.env.BUSY_MAXMEM) || 50; // 50% default

var forceBusyAbsolute = process.env.FORCE_BUSY_ABSOLUTE === 'true';
var forceBusy = process.env.FORCE_BUSY === 'true';
var forceBusyMessage = process.env.FORCE_BUSY_MESSAGE
|| 'We are experiencing technical difficulties right now.';

app.use(function (aReq, aRes, aNext) {
var pathname = aReq._parsedUrl.pathname;
Expand Down Expand Up @@ -286,7 +288,7 @@ app.use(function (aReq, aRes, aNext) {
statusCodePage(aReq, aRes, aNext, {
statusCode: 503,
statusMessage:
'We are experiencing technical difficulties right now. Please try again later.'
forceBusyMessage + ' Please try again later.'
});
return;

Expand Down

0 comments on commit 52e2251

Please sign in to comment.