Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
force SCRIPT_NAME="" for darklaunch pages (bug 554576)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbalogh committed Mar 24, 2010
1 parent b6a0f0f commit 40a7302
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion wsgi/zamboni.wsgi
Expand Up @@ -15,7 +15,17 @@ import zamboni.manage
os.environ['DJANGO_SETTINGS_MODULE'] = 'zamboni.local_settings'

# This is what mod_wsgi runs.
application = django.core.handlers.wsgi.WSGIHandler()
django_app = application = django.core.handlers.wsgi.WSGIHandler()


# Normally we could let WSGIHandler run directly, but while we're dark
# launching, we want to force the script name to be empty so we don't create
# any /z links through reverse. This fixes bug 554576.
def application(env, start_response):
if 'HTTP_X_ZEUS_DL_PT' in env:
env['SCRIPT_NAME'] = ''
return django_app(env, start_response)


# Uncomment this to figure out what's going on with the mod_wsgi environment.
# def application(env, start_response):
Expand Down

0 comments on commit 40a7302

Please sign in to comment.