502 not so ugly error page for nginx

merge-requests/208/head
fatchan 5 years ago
parent 32b18900a4
commit 025e6de2d5
  1. 1
      configs/nginx.example
  2. 1
      configs/nginx_no_https.example
  3. 2
      gulpfile.js
  4. 9
      views/pages/502.pug

@ -7,6 +7,7 @@ server {
server_name domain.com www.domain.com;
server_tokens off;
error_page 404 = /path/to/jschan/static/html/404.html;
error_page 502 = /path/to/jschan/static/html/502.html;
add_header Cache-Control "public";
add_header Content-Security-Policy "default-src 'self'; img-src 'self'; object-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'";

@ -7,6 +7,7 @@ server {
server_name domain.com www.domain.com;
server_tokens off;
error_page 404 = /path/to/jschan/static/html/404.html;
error_page 502 = /path/to/jschan/static/html/502.html;
add_header Cache-Control "public";
add_header Content-Security-Policy "default-src 'self'; img-src 'self'; object-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'";

@ -137,7 +137,7 @@ function deletehtml() {
}
function custompages() {
return gulp.src([`${paths.pug.src}/custompages/*.pug`, `${paths.pug.src}/pages/404.pug`])
return gulp.src([`${paths.pug.src}/custompages/*.pug`, `${paths.pug.src}/pages/404.pug`, `${paths.pug.src}/pages/502.pug`])
.pipe(gulppug({
locals: {
defaultTheme: configs.boardDefaults.theme,

@ -0,0 +1,9 @@
extends ../layout.pug
block head
script(src='/js/all.js')
block content
h1 502 Bad gateway
p The site is either down for maintenance, or geting DDoS'd
p Don't worry, it will be back soon :^)
Loading…
Cancel
Save