From b7360f884b7af6e4513b29b246248c3b6c7e416e Mon Sep 17 00:00:00 2001 From: Drath Date: Mon, 29 Dec 2025 19:15:14 +0100 Subject: [PATCH] update --- app/main.py | 9 ++++++--- app/templates/error.html.j2 | 14 ++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/main.py b/app/main.py index 94cb98a..518d1e0 100644 --- a/app/main.py +++ b/app/main.py @@ -1,6 +1,8 @@ -from flask import Flask, render_template +from flask import Flask, render_template, request from flask_minify import minify from flask_compress import Compress +from http.client import responses +import socket import waitress import ping3 @@ -9,7 +11,7 @@ isProdution = True # READ README YOU STUPID FUCK app = Flask(__name__.split('.')[0]) -Compress(app) +# Compress(app) if isProdution: minify(app=app, html=True, js=True, cssless=True) @@ -41,7 +43,8 @@ def server(): @app.route('/http/') def httpcodes(status): - return render_template('error.html.j2', status=status, host="10.0.0.102") + status = int(status.replace('\'', '')) + return render_template('error.html.j2', status=status, host=socket.gethostname(), desc=responses[status], site=request.host) if __name__ == '__main__': if isProdution: diff --git a/app/templates/error.html.j2 b/app/templates/error.html.j2 index 3e20317..76a0ee7 100644 --- a/app/templates/error.html.j2 +++ b/app/templates/error.html.j2 @@ -4,14 +4,20 @@ + -

oops.

-
- We got HTTP status {{ status }} +

{{ desc.lower() }}.

+
+ Tell Drath, he'll fix it eventually.