Edgewall Software

Changes between Version 2 and Version 3 of Gunicorn


Ignore:
Timestamp:
Mar 7, 2011, 2:46:37 PM (13 years ago)
Author:
anonymous
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Gunicorn

    v2 v3  
    9797
    9898}}}
     99
     100Note: It seems the wsgi entry point does not handle the Digest or Basic http authentication. To ensure the authentication middleware are passed, you'll have to hack a little bit the tracwsgi.py :
     101
     102
     103{{{
     104
     105import sys
     106import os
     107
     108sys.stdout = sys.stderr
     109os.environ['TRAC_ENV_PARENT_DIR'] = '/home/repos/trac.enabled/'
     110os.environ['PYTHON_EGG_CACHE'] = '/home/repos/projects/.eggs/'
     111
     112from trac.web.standalone import AuthenticationMiddleware
     113from trac.web.main import dispatch_request
     114from trac.web.auth import BasicAuthentication
     115def application(environ, start_application):
     116    auth = {"*" : BasicAuthentication("/etc/nginx/conf/users", "realm")}
     117    wsgi_app = AuthenticationMiddleware(dispatch_request, auth)
     118    return wsgi_app(environ, start_application)
     119
     120
     121}}}