mirror of
https://github.com/QingdaoU/Spirit.git
synced 2025-01-01 09:31:48 +00:00
parent
446adee597
commit
c9c16653e6
@ -16,8 +16,7 @@ from .conf import settings
|
|||||||
class XForwardedForMiddleware(MiddlewareMixin):
|
class XForwardedForMiddleware(MiddlewareMixin):
|
||||||
|
|
||||||
def process_request(self, request):
|
def process_request(self, request):
|
||||||
if not settings.DEBUG:
|
request.META['REMOTE_ADDR'] = request.META['HTTP_X_FORWARDED_FOR'].split(",")[-1].strip()
|
||||||
request.META['REMOTE_ADDR'] = request.META['HTTP_X_FORWARDED_FOR'].split(",")[-1].strip()
|
|
||||||
|
|
||||||
|
|
||||||
class PrivateForumMiddleware(MiddlewareMixin):
|
class PrivateForumMiddleware(MiddlewareMixin):
|
||||||
|
Loading…
Reference in New Issue
Block a user