aboutsummaryrefslogtreecommitdiff
path: root/middleware
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-07-22 19:26:06 -0400
committerBobby <[email protected]>2024-07-22 19:26:06 -0400
commit8a18b444a933b4e607403e04f618f2f2a179ff0f (patch)
tree13eedc12cead911f5ce8842c193352f77e565213 /middleware
parent5e5080d1ae600d88170633ae1ed7c655a32ebf76 (diff)
downloadthatcomputerscientist-8a18b444a933b4e607403e04f618f2f2a179ff0f.tar.xz
thatcomputerscientist-8a18b444a933b4e607403e04f618f2f2a179ff0f.zip
Ignore Ignis Middleware on localhost. Google Fonts: iOS Safari Fix.
Diffstat (limited to 'middleware')
-rw-r--r--middleware/ignismiddleware.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/middleware/ignismiddleware.py b/middleware/ignismiddleware.py
index b7a7b932..2b51a740 100644
--- a/middleware/ignismiddleware.py
+++ b/middleware/ignismiddleware.py
@@ -25,6 +25,10 @@ class IgnisMiddleware(MiddlewareMixin):
def __call__(self, request):
response = self.get_response(request)
+ # id request is from localhost, do not process
+ if re.match(r"^localhost", request.get_host()):
+ return response
+
# Do not process non-HTML responses
if not response["Content-Type"].startswith("text/html"):
return response