diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2017-11-23 20:05:41 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-11-23 20:05:41 +0300 |
commit | 04b1d52ca05f268a63a72181600aa09251b6297a (patch) | |
tree | 0511d284185f68eef3cd7fa3eb2121d20c99ffb5 /internal | |
parent | 15c938cafbd95064bbc4be34cd72091f9a61edaa (diff) |
Return 503 until pages are loaded for the first time
Diffstat (limited to 'internal')
-rw-r--r-- | internal/httperrors/httperrors.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/httperrors/httperrors.go b/internal/httperrors/httperrors.go index 82d43fc5..92413e07 100644 --- a/internal/httperrors/httperrors.go +++ b/internal/httperrors/httperrors.go @@ -40,6 +40,15 @@ var ( `<p>Try refreshing the page, or going back and attempting the action again.</p> <p>Please contact your GitLab administrator if this problem persists.</p>`, } + + content503 = content{ + http.StatusServiceUnavailable, + "Service Unavailable (503)", + "503", + "Whoops, something went wrong on our end.", + `<p>Try refreshing the page, or going back and attempting the action again.</p> + <p>Please contact your GitLab administrator if this problem persists.</p>`, + } ) const predefinedErrorPage = ` @@ -160,3 +169,8 @@ func Serve500(w http.ResponseWriter) { func Serve502(w http.ResponseWriter) { serveErrorPage(w, content502) } + +// Serve503 returns a 503 error response / HTML page to the http.ResponseWriter +func Serve503(w http.ResponseWriter) { + serveErrorPage(w, content503) +} |