diff options
| -rw-r--r-- | middleware/ignismiddleware.py | 4 | ||||
| -rw-r--r-- | 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 @@ <meta property="twitter:image" content="{{ request.meta.image }}" /> <meta property="robots" content="{{ request.meta.robots }}" /> <title>Shifoo - {{ title }}</title> + <link rel="preconnect" href="https://fonts.googleapis.com" /> + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link type="text/css" rel="stylesheet" @@ -144,15 +146,19 @@ </div> </body> - {% comment %} <div id="tl_block" style="display: none"></div> {% endcomment %} + {% comment %} + <div id="tl_block" style="display: none"></div> + {% endcomment %} <script src="{% static 'js/jquery-1.12.4.min.js' %}"></script> <script src="{% static 'js/globals.js' %}"></script> <script src="{% static 'js/spells.js' %}"></script> <script src="{% static 'js/phone_compatibility.js' %}"></script> - {% comment %} <script src="{% static 'js/db.js' %}"></script> {% endcomment %} + {% comment %} + <script src="{% static 'js/db.js' %}"></script> + {% endcomment %} <script - type="text/javascript" - src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" + type="text/javascript" + src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" ></script> <script src="{% static 'js/tl.js' %}"></script> {% if request.COOKIES.summonOneko == 'true' %} |
