9
0
mirror of https://github.com/donlon/cloudflare-error-page.git synced 2025-12-19 14:59:28 +00:00

doc: update README.md

This commit is contained in:
Anthony Donlon
2025-11-19 21:10:11 +08:00
parent a3757f3a76
commit 463b4e7151
3 changed files with 33 additions and 3 deletions

View File

@@ -2,9 +2,7 @@
## What does this project do? ## What does this project do?
This project creates customized error pages that mimics Cloudflare's error page. And you can embed it into your website. This project creates customized error pages that mimics the well-known Cloudflare's error page. You can also embed it into your website.
![Default error page](doc/default.png)
## Quickstart ## Quickstart
@@ -44,6 +42,8 @@ with open('error.html', 'w') as f:
webbrowser.open('error.html') webbrowser.open('error.html')
``` ```
![Default error page](doc/default.png)
## More Examples ## More Examples
### Catastrophic infrastructure failure ### Catastrophic infrastructure failure
@@ -81,6 +81,36 @@ params = {
![Catastrophic infrastructure failure](doc/example.png) ![Catastrophic infrastructure failure](doc/example.png)
### Web server is working
``` Python
params = {
'title': 'Web server is working',
'error_code': 200,
"more_information": {
"hidden": True,
},
'browser_status': {
'status': 'ok',
'status_text': 'Seems Working',
},
'cloudflare_status': {
'status': 'ok',
'status_text': 'Often Working',
},
'host_status': {
'status': 'ok',
'location': 'example.com',
'status_text': 'Just Working',
},
'error_source': 'host',
'what_happened': '<p>This site is still working. And it looks great.</p>',
'what_can_i_do': '<p>Visit the site before it crashes someday.</p>',
}
```
![Web server is working](doc/example2.png)
## Full Parameter Reference ## Full Parameter Reference
``` JavaScript ``` JavaScript
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 91 KiB

BIN
doc/example2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB