mirror of
https://github.com/QingdaoU/Spirit.git
synced 2024-12-28 15:32:12 +00:00
parent
446adee597
commit
c9c16653e6
@ -16,8 +16,7 @@ from .conf import settings
|
||||
class XForwardedForMiddleware(MiddlewareMixin):
|
||||
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user