diff --git a/django_seo_js/backends/base.py b/django_seo_js/backends/base.py index 186a814..8aa2d5f 100644 --- a/django_seo_js/backends/base.py +++ b/django_seo_js/backends/base.py @@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs): def build_django_response_from_requests_response(self, response): r = HttpResponse(response.content) for k, v in response.headers.items(): - if k not in IGNORED_HEADERS: + if k.lower() not in IGNORED_HEADERS: r[k] = v r['content-length'] = len(response.content) r.status_code = response.status_code diff --git a/django_seo_js/backends/prerender.py b/django_seo_js/backends/prerender.py index 8d6ec9d..7159cb1 100644 --- a/django_seo_js/backends/prerender.py +++ b/django_seo_js/backends/prerender.py @@ -1,5 +1,6 @@ from django_seo_js import settings from base import SEOBackendBase, RequestsBasedBackend +import json class PrerenderIO(SEOBackendBase, RequestsBasedBackend): @@ -55,7 +56,7 @@ def update_url(self, url=None, regex=None): if regex: data["regex"] = regex - r = self.session.post(self.RECACHE_URL, headers=headers, data=data) + r = self.session.post(self.RECACHE_URL, headers=headers, data=json.dumps(data)) return r.status_code < 500