about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.py b/main.py
index db3a716..97f53d0 100644
--- a/main.py
+++ b/main.py
@@ -178,6 +178,9 @@ class HTTPServer:
             with open(filepath, "rb") as file:
                 data = file.read()
 
+            if filepath[-4:] == "html":
+                data = minimize_html(data)
+
             if request.type == "GET":
                 return Response(data, STATUS_CODE_OK)
             elif request.type == "HEAD":