Avoid key error
This commit is contained in:
parent
1002d94787
commit
6b86c4ceff
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ class OrganizationMovedMiddleware(MiddlewareMixin):
|
|||
headers = dict(
|
||||
(regex.sub("", header), value) for (header, value) in request.META.items() if header.startswith("HTTP_")
|
||||
)
|
||||
headers.pop("HOST")
|
||||
headers.pop("HOST", None)
|
||||
if request.META["CONTENT_TYPE"]:
|
||||
headers["CONTENT_TYPE"] = request.META["CONTENT_TYPE"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue