Publisher task
This commit is contained in:
0
app_urls/fetcher/middleware/__init__.py
Normal file
0
app_urls/fetcher/middleware/__init__.py
Normal file
@@ -1,14 +1,5 @@
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
|
||||
'''
|
||||
class FaviconMiddleware(MiddlewareMixin):
|
||||
def process_response(self, request, response):
|
||||
if 'text/html' in response.get('Content-Type', '') and b'</head>' in response.content:
|
||||
icon_link = b'<link rel="icon" type="image/png" href="/static/img/mate-icon.png">\n'
|
||||
response.content = response.content.replace(b'</head>', icon_link + b'</head>')
|
||||
return response
|
||||
'''
|
||||
|
||||
class FaviconMiddleware(MiddlewareMixin):
|
||||
def process_response(self, request, response):
|
||||
if 'text/html' in response.get('Content-Type', '') and b'</head>' in response.content:
|
||||
|
||||
Reference in New Issue
Block a user