diff options
| author | Ziad Sawalha <github@highbridgellc.com> | 2011-04-19 18:50:22 -0500 |
|---|---|---|
| committer | Ziad Sawalha <github@highbridgellc.com> | 2011-04-19 18:50:22 -0500 |
| commit | 28f811e7dd34e0084a3199f3aa32273d1845f669 (patch) | |
| tree | 4da4797346570a04dc48e66c8599f1777216ef40 /echo | |
| parent | cab4a265da4d67fe79df6e4c8ed9950a239371c0 (diff) | |
Sync
Diffstat (limited to 'echo')
| -rw-r--r-- | echo/echo/echo.ini | 11 | ||||
| -rw-r--r-- | echo/echo/echo.py | 5 |
2 files changed, 11 insertions, 5 deletions
diff --git a/echo/echo/echo.ini b/echo/echo/echo.ini index 0d38c6e7..6dfc495a 100644 --- a/echo/echo/echo.ini +++ b/echo/echo/echo.ini @@ -2,17 +2,18 @@ [app:echo] use = egg:echo -#use = egg:Paste#urlmap #/ = echo [pipeline:main] -pipeline = papiauth echo +pipeline = + papiauth + echo [filter:papiauth] use = egg:keystone#papiauth -ip = 127.0.0.1 -port = 1234 -pass = dTpw +auth_ip = 127.0.0.1 +auth_port = 8080 +auth_pass = dTpw [server:main] use = egg:Paste#http diff --git a/echo/echo/echo.py b/echo/echo/echo.py index efe24445..8a5340b8 100644 --- a/echo/echo/echo.py +++ b/echo/echo/echo.py @@ -34,6 +34,11 @@ class EchoApp: self.transform = etree.XSLT(etree.parse("xsl/echo.xsl")) def __iter__(self): + if 'HTTP_X_AUTHORIZATION' not in self.envr: + proxy_location = 'http://' + ' ' + ':' + \ + str(' ') + '/' + return HTTPUseProxy(location=proxy_location)(env, start_response) + accept = self.envr.get("HTTP_ACCEPT","application/json") if accept == "application/xml": return self.toXML() |
