9
0
mirror of https://github.com/donlon/cloudflare-error-page.git synced 2025-12-29 11:49:09 +00:00

miscellaneous updates

This commit is contained in:
Anthony Donlon
2025-12-09 22:17:34 +08:00
parent 46b4c99e72
commit d1dc6b3bc2
5 changed files with 19 additions and 26 deletions

View File

@@ -7,7 +7,7 @@ BEHIND_PROXY = true
# Some random secret, will be auto-generated if empty
SECRET_KEY = ''
# Main database URL
# Main database URI
SQLALCHEMY_DATABASE_URI = 'sqlite:///database.db'
# Rate limit storage for Flask-Limiter

View File

@@ -0,0 +1,3 @@
Flask
Flask-Limiter
Flask-SqlAlchemy

View File

@@ -113,7 +113,7 @@ def get(name: str):
params['creator_info'] = {
'hidden': False,
'text': 'CF Error Page Editor',
'link': f'https://virt.moe/cloudflare-error-page/editor/#from={name}',
'link': request.host_url[:-1] + url_for('editor.index') + f'#from={name}',
}
# Always escape HTML
params['what_happened'] = html.escape(params.get('what_happened', '')) # TODO: common render function?