diff options
Diffstat (limited to 'askbot/middleware/forum_mode.py')
-rw-r--r-- | askbot/middleware/forum_mode.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/askbot/middleware/forum_mode.py b/askbot/middleware/forum_mode.py index 7f1e29b1..d593a6f2 100644 --- a/askbot/middleware/forum_mode.py +++ b/askbot/middleware/forum_mode.py @@ -45,6 +45,10 @@ class ForumModeMiddleware(object): and request.user.is_anonymous()): resolver_match = ResolverMatch(resolve(request.path)) + internal_ips = getattr(settings, 'ASKBOT_INTERNAL_IPS', None) + if internal_ips and request.META['REMOTE_ADDR'] in internal_ips: + return None + if is_view_allowed(resolver_match.func): return |