changeset 4295:7b81f1a6e8e5

Added trusted proxies option to make_application
author Florian Krupicka <florian.krupicka@googlemail.com>
date Sun, 10 Aug 2008 19:46:18 +0200
parents 81def9a2f5e1
children d8132a6036f2
files MoinMoin/web/serving.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/serving.py	Sun Aug 10 19:14:31 2008 +0200
+++ b/MoinMoin/web/serving.py	Sun Aug 10 19:46:18 2008 +0200
@@ -62,9 +62,12 @@
             del environ['REMOTE_ADDR']
         return self.app(environ, start_response)
 
-def make_application(shared=None):
+def make_application(shared=None, trusted_proxies=None):
     from MoinMoin.wsgiapp import application
 
+    if trusted_proxies:
+        application = ProxyTrust(application, trusted_proxies)
+
     if isinstance(shared, dict):
         application = SharedDataMiddleware(application, shared)
     elif shared: