From 8a18b444a933b4e607403e04f618f2f2a179ff0f Mon Sep 17 00:00:00 2001 From: Bobby Date: Mon, 22 Jul 2024 19:26:06 -0400 Subject: Ignore Ignis Middleware on localhost. Google Fonts: iOS Safari Fix. --- middleware/ignismiddleware.py | 4 ++++ templates/blog/partials/base.html | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 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 diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html index 071500ee..a6fe2a76 100644 --- a/templates/blog/partials/base.html +++ b/templates/blog/partials/base.html @@ -22,6 +22,8 @@ Shifoo - {{ title }} + + - {% comment %} {% endcomment %} + {% comment %} + + {% endcomment %} - {% comment %} {% endcomment %} + {% comment %} + + {% endcomment %} {% if request.COOKIES.summonOneko == 'true' %} -- cgit v1.2.3