diff options
| author | Bobby <[email protected]> | 2024-07-22 19:26:06 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-07-22 19:26:06 -0400 |
| commit | 8a18b444a933b4e607403e04f618f2f2a179ff0f (patch) | |
| tree | 13eedc12cead911f5ce8842c193352f77e565213 /middleware/ignismiddleware.py | |
| parent | 5e5080d1ae600d88170633ae1ed7c655a32ebf76 (diff) | |
| download | thatcomputerscientist-8a18b444a933b4e607403e04f618f2f2a179ff0f.tar.xz thatcomputerscientist-8a18b444a933b4e607403e04f618f2f2a179ff0f.zip | |
Ignore Ignis Middleware on localhost. Google Fonts: iOS Safari Fix.
Diffstat (limited to 'middleware/ignismiddleware.py')
| -rw-r--r-- | middleware/ignismiddleware.py | 4 |
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 |
