Commit 8afb7b80 authored by Olaf Michaelis's avatar Olaf Michaelis
Browse files

Add modified wsgi.py to avoid corrupt urls

parent f9f8e04a
......@@ -4,7 +4,6 @@ source /opt/ve.sh
if [[ $(pip freeze | grep -Poc "^rdmo==") == "0" ]]; then
cp -f /tmp/wsgi.py /vol/rdmo-app/config/wsgi.py
pip install --upgrade pip
pip install --upgrade wheel
......@@ -15,6 +14,7 @@ if [[ $(pip freeze | grep -Poc "^rdmo==") == "0" ]]; then
git clone ${RDMO_APP_REPO} ${RDMO_APP}
cp -f /tmp/template_local.py ${RDMO_APP}/config/settings/local.py
cp -f /tmp/wsgi.py ${RDMO_APP}/config/wsgi.py
cd ${RDMO_APP}
python manage.py makemigrations
......
......@@ -17,7 +17,7 @@ cryptographic signing, and should be set to a unique, unpredictable value.
SECRET_KEY = 'this is not a very secret key'
'''
The list of URLs und which this application available
The list of URLs under which this application is available
'''
ALLOWED_HOSTS = [x.strip() for x in os.environ['ALLOWED_HOSTS'].split(',')]
# ALLOWED_HOSTS = ['localhost', 'ip6-localhost', '127.0.0.1', '[::1]', 'rdmo']
......@@ -25,7 +25,7 @@ ALLOWED_HOSTS = [x.strip() for x in os.environ['ALLOWED_HOSTS'].split(',')]
'''
The root url of your application, only needed when its not '/'
'''
# BASE_URL = '/path'
BASE_URL = os.environ['BASE_URL']
'''
Language code and time zone
......
import os
import re
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
try:
os.environ['BASE_URL']
except KeyError:
pass
else:
if bool(re.search('[a-z0-9]', os.environ['BASE_URL'])) is False:
os.environ['BASE_URL'] = ''
application = get_wsgi_application()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment