diff --git a/README.md b/README.md index 9ad26d4..d2c2e69 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,35 @@ docker pull ghcr.io/ctfpilot/error-fallback:latest *For the versions available, please see the [releases page](https://github.com/ctfpilot/error-fallback/releases).* +## Pages + +Each page is generated from a file in [`src/content`](./src/content) (see [Development](#development) below) and is served as static HTML behind a reverse proxy. Which page is shown is determined by whichever HTTP status code the proxy maps to this service. Every page automatically polls the original request's host and reloads once it starts responding normally again, so the page updates on its own once the underlying issue is resolved. + +| Page | Title | Intended use | +| ----------- | ----------------------- | ------------------------------------------------------------------------------------- | +| `index.html` | Error | Generic fallback page for errors that don't have a more specific page | +| `401.html` | Unauthorized | Authentication is required to access this resource | +| `403.html` | Forbidden | The request is authenticated but the caller doesn't have permission | +| `404.html` | Not found | The requested page could not be found | +| `405.html` | Method Not Allowed | The HTTP method used is not supported for the requested resource | +| `500.html` | Error | Same generic message as `index.html`, with an added link back to the home page | +| `502.html` | Bad gateway | The service did not respond correctly | +| `503.html` | No service available | The service is temporarily unavailable, e.g. while restarting or under maintenance | +| `504.html` | Gateway timeout | The service did not respond in time, e.g. while restarting or under maintenance | + +
+Preview of each page + +| | | +| --- | --- | +| **Index** ![Index page](docs/images/index.png) | **401 Unauthorized** ![401 page](docs/images/401.png) | +| **403 Forbidden** ![403 page](docs/images/403.png) | **404 Not found** ![404 page](docs/images/404.png) | +| **405 Method Not Allowed** ![405 page](docs/images/405.png) | **500 Error** ![500 page](docs/images/500.png) | +| **502 Bad gateway** ![502 page](docs/images/502.png) | **503 No service available** ![503 page](docs/images/503.png) | +| **504 Gateway timeout** ![504 page](docs/images/504.png) | | + +
+ ### Development In order to generate the pages, run the [`generator.py`](./src/generator.py) script in `src`: diff --git a/docs/images/401.png b/docs/images/401.png new file mode 100644 index 0000000..e61177e Binary files /dev/null and b/docs/images/401.png differ diff --git a/docs/images/403.png b/docs/images/403.png new file mode 100644 index 0000000..c8c82f1 Binary files /dev/null and b/docs/images/403.png differ diff --git a/docs/images/404.png b/docs/images/404.png new file mode 100644 index 0000000..4646f11 Binary files /dev/null and b/docs/images/404.png differ diff --git a/docs/images/405.png b/docs/images/405.png new file mode 100644 index 0000000..5538351 Binary files /dev/null and b/docs/images/405.png differ diff --git a/docs/images/500.png b/docs/images/500.png new file mode 100644 index 0000000..83c781e Binary files /dev/null and b/docs/images/500.png differ diff --git a/docs/images/502.png b/docs/images/502.png new file mode 100644 index 0000000..88225bd Binary files /dev/null and b/docs/images/502.png differ diff --git a/docs/images/503.png b/docs/images/503.png new file mode 100644 index 0000000..02fcaa4 Binary files /dev/null and b/docs/images/503.png differ diff --git a/docs/images/504.png b/docs/images/504.png new file mode 100644 index 0000000..988489c Binary files /dev/null and b/docs/images/504.png differ diff --git a/docs/images/index.png b/docs/images/index.png new file mode 100644 index 0000000..76230de Binary files /dev/null and b/docs/images/index.png differ