967 B
967 B
error-pages
Error pages for montehaselino.de. The service is to used as a quick error response service. It delivers a single html file as response with every resource inlined and encoded into it.
Make sure to compile every resource into the main.php file. This is due to the fact, that the error response is not a redirect to a public web server but rather an response for by the reverse proxy from an restricted backend. Make sure to inline resources:
npm install inliner
npx inliner index.php > index-inlined-minified.php
Example configuration for caddy:
reverse_proxy https://service {
@custom_error status 4xx 5xx
handle_response @custom_error {
# rewrite uri to be the status code
rewrite * /{rp.status_code}
# send automatically generated response page
# the answer must be a single html file without resource from the same origin
reverse_proxy http://error-response:8080
}
}