mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-15 12:38:03 +00:00
Clean up with black
This commit is contained in:
@@ -1,9 +1,14 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
Middleware classes
|
Middleware classes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from django.utils.deprecation import MiddlewareMixin
|
from django.utils.deprecation import MiddlewareMixin
|
||||||
|
|
||||||
class MultipleProxyMiddleware(MiddlewareMixin): # pylint: disable=too-few-public-methods
|
|
||||||
|
class MultipleProxyMiddleware(
|
||||||
|
MiddlewareMixin
|
||||||
|
): # pylint: disable=too-few-public-methods
|
||||||
"""
|
"""
|
||||||
Middleware to rewrite proxy headers for deployments
|
Middleware to rewrite proxy headers for deployments
|
||||||
with multiple proxies
|
with multiple proxies
|
||||||
@@ -14,5 +19,7 @@ class MultipleProxyMiddleware(MiddlewareMixin): # pylint: disable=too-few-publi
|
|||||||
Rewrites the proxy headers so that forwarded server is
|
Rewrites the proxy headers so that forwarded server is
|
||||||
used if available.
|
used if available.
|
||||||
"""
|
"""
|
||||||
if 'HTTP_X_FORWARDED_SERVER' in request.META:
|
if "HTTP_X_FORWARDED_SERVER" in request.META:
|
||||||
request.META['HTTP_X_FORWARDED_HOST'] = request.META['HTTP_X_FORWARDED_SERVER']
|
request.META["HTTP_X_FORWARDED_HOST"] = request.META[
|
||||||
|
"HTTP_X_FORWARDED_SERVER"
|
||||||
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user