mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 15:29:38 -05:00
added awesome pink skull and crossbone 404 error page
This commit is contained in:
parent
ef18336520
commit
066b0239ee
15
404.html
Normal file
15
404.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Error 404</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #FFC4D5;
|
||||
color: #FF0048;
|
||||
text-align: center;
|
||||
font-size: 30em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>☠</body>
|
||||
</html>
|
@ -31,6 +31,10 @@ def download():
|
||||
basename = os.path.basename(filename)
|
||||
return send_from_directory(dirname, basename, as_attachment=True)
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(e):
|
||||
return render_template_string(open('{0}/404.html'.format(os.path.dirname(__file__))).read())
|
||||
|
||||
def get_platform():
|
||||
if 'ONIONSHARE_PLATFORM' in os.environ:
|
||||
return os.environ['ONIONSHARE_PLATFORM']
|
||||
|
Loading…
Reference in New Issue
Block a user