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:
36
README.md
36
README.md
@@ -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.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
@@ -44,6 +42,8 @@ with open('error.html', 'w') as f:
|
|||||||
webbrowser.open('error.html')
|
webbrowser.open('error.html')
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## More Examples
|
## More Examples
|
||||||
|
|
||||||
### Catastrophic infrastructure failure
|
### Catastrophic infrastructure failure
|
||||||
@@ -81,6 +81,36 @@ params = {
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### 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>',
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Full Parameter Reference
|
## Full Parameter Reference
|
||||||
``` JavaScript
|
``` JavaScript
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
doc/example.png
BIN
doc/example.png
Binary file not shown.
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 91 KiB |
BIN
doc/example2.png
Normal file
BIN
doc/example2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Reference in New Issue
Block a user