Simple but pretty unicorn rainbow error pages for webserver 40x/50x HTTP errors
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Adam Piontek 5da2f2cc80 rebuild dist 10 months ago
.github initial commit 1 year ago
configuration updated more deps, major versions 10 months ago
dist rebuild dist 10 months ago
src update deps, fix bg-cover issue, increment version 10 months ago
.babelrc initial commit 1 year ago
.eslintrc initial commit 1 year ago
.gitignore update .gitignore to stop ignoring dist 10 months ago
.prettierrc initial commit 1 year ago
.sasslintrc initial commit 1 year ago
.travis.yml initial commit 1 year ago
CHANGELOG.md initial commit 1 year ago
LICENSE initial commit 1 year ago
README.md fixing caddy config in readme, adding dist files 10 months ago
SECURITY.md initial commit 1 year ago
package-lock.json update deps, fix bg-cover issue, increment version 10 months ago
package.json update deps, fix bg-cover issue, increment version 10 months ago
postcss.config.js initial commit 1 year ago
svgo.config.js initial commit 1 year ago
tailwind.config.js initial commit 1 year ago
webpack.config.js updated to support caddy custom error pages 10 months ago

README.md

73k.us custom rainbow error pages (40x/50x)

Based off frontend-webpack-boilerplate with TailwindCSS added.

Builds html & css that can be used as custom error page templates with caddy.

NOTE

After production build, optionally remove the empty, 0-byte app.js script tags from the built files, just to optimize things further.

caddy example

With this snippet in the Caddyfile, for a site one can import err to handle errors for that site.

(err) {
	@errpaths {
		path /err_css/*
		path /err_images/*
	}
	route @errpaths {
		root * /www/err
		file_server
	}
	respond /unknown_error_not_4xx_not_5xx "{http.error.status_code} {http.error.status_text}"

	handle_errors {
		@4xx expression `{http.error.status_code} >= 400 && {http.error.status_code} < 500`
		@5xx expression `{http.error.status_code} >= 500 && {http.error.status_code} < 600`

		root * /www/err
		encode zstd gzip
		file_server

		rewrite @4xx /4xx.html
		rewrite @5xx /5xx.html
		rewrite * /unknown_error_not_4xx_not_5xx
		templates
	}
}