diff --git a/README.md b/README.md index 9ad26d4..44b735b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,39 @@ 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 + +| Page | Light mode | Dark mode | +| --- | --- | --- | +| **Index** | ![Index page](docs/images/index.png) | ![Index page, dark mode](docs/images/index-dark.png) | +| **401 Unauthorized** | ![401 page](docs/images/401.png) | ![401 page, dark mode](docs/images/401-dark.png) | +| **403 Forbidden** | ![403 page](docs/images/403.png) | ![403 page, dark mode](docs/images/403-dark.png) | +| **404 Not found** | ![404 page](docs/images/404.png) | ![404 page, dark mode](docs/images/404-dark.png) | +| **405 Method Not Allowed** | ![405 page](docs/images/405.png) | ![405 page, dark mode](docs/images/405-dark.png) | +| **500 Error** | ![500 page](docs/images/500.png) | ![500 page, dark mode](docs/images/500-dark.png) | +| **502 Bad gateway** | ![502 page](docs/images/502.png) | ![502 page, dark mode](docs/images/502-dark.png) | +| **503 No service available** | ![503 page](docs/images/503.png) | ![503 page, dark mode](docs/images/503-dark.png) | +| **504 Gateway timeout** | ![504 page](docs/images/504.png) | ![504 page, dark mode](docs/images/504-dark.png) | + +
+ ### Development In order to generate the pages, run the [`generator.py`](./src/generator.py) script in `src`: diff --git a/docs/images/401-dark.png b/docs/images/401-dark.png new file mode 100644 index 0000000..86c8bd0 Binary files /dev/null and b/docs/images/401-dark.png differ 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-dark.png b/docs/images/403-dark.png new file mode 100644 index 0000000..90b09f1 Binary files /dev/null and b/docs/images/403-dark.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-dark.png b/docs/images/404-dark.png new file mode 100644 index 0000000..d84325e Binary files /dev/null and b/docs/images/404-dark.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-dark.png b/docs/images/405-dark.png new file mode 100644 index 0000000..d815ad5 Binary files /dev/null and b/docs/images/405-dark.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-dark.png b/docs/images/500-dark.png new file mode 100644 index 0000000..47c14e1 Binary files /dev/null and b/docs/images/500-dark.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-dark.png b/docs/images/502-dark.png new file mode 100644 index 0000000..b2c74dc Binary files /dev/null and b/docs/images/502-dark.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-dark.png b/docs/images/503-dark.png new file mode 100644 index 0000000..617a266 Binary files /dev/null and b/docs/images/503-dark.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-dark.png b/docs/images/504-dark.png new file mode 100644 index 0000000..232459e Binary files /dev/null and b/docs/images/504-dark.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-dark.png b/docs/images/index-dark.png new file mode 100644 index 0000000..ea8bb5c Binary files /dev/null and b/docs/images/index-dark.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