Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Comment on lines +38 to +46

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: The "Intended use" column's text should have a "." at the end of the sentences.


<details>
<summary>Preview of each page</summary>

| | |
| --- | --- |
| **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) | |

</details>
Comment on lines +48 to +59

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to mention, that the screenshot are from the light mode, and dark mode is active if the system preffers dark.


### Development

In order to generate the pages, run the [`generator.py`](./src/generator.py) script in `src`:
Expand Down
Binary file added docs/images/401.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/403.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/405.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/502.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/503.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/504.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading