Gitlab CSE Unil

Commit 6a087d5b authored by Julien Furrer's avatar Julien Furrer
Browse files

Fixed trailing slash at the end of BASE_URL

parent 0f30e1d3
......@@ -67,7 +67,7 @@
WSGIDaemonProcess adim.django user=www-data group=www-data
WSGIScriptAlias /adim/ "/var/django/projects/adim.django/adim_project/adim_project/wsgi/production.py"
WSGIScriptAlias /adim "/var/django/projects/adim.django/adim_project/adim_project/wsgi/production.py"
<Directory "/var/django/projects/adim.django/adim_project/adim_project">
WSGIProcessGroup adim.django
WSGIPassAuthorization On
......
......@@ -67,7 +67,7 @@
WSGIDaemonProcess adim-dev.django user=www-data group=www-data
WSGIScriptAlias /adim-dev/ "/var/django/projects/adim-dev.django/adim_project/adim_project/wsgi/staging.py"
WSGIScriptAlias /adim-dev "/var/django/projects/adim-dev.django/adim_project/adim_project/wsgi/staging.py"
<Directory "/var/django/projects/adim-dev.django/adim_project/adim_project">
WSGIProcessGroup adim-dev.django
WSGIPassAuthorization On
......
......@@ -119,8 +119,8 @@ def update_urls(base_url=None, name=__name__):
setattr(this_module, 'BASE_URL', base_url)
setattr(this_module, 'SESSION_COOKIE_PATH', base_url)
setattr(this_module, 'CSRF_COOKIE_PATH', base_url)
setattr(this_module, 'MEDIA_URL', '{}media/'.format(base_url))
setattr(this_module, 'STATIC_URL', '{}static/'.format(base_url))
setattr(this_module, 'MEDIA_URL', '{}/media/'.format(base_url))
setattr(this_module, 'STATIC_URL', '{}/static/'.format(base_url))
update_urls("/")
# ---------- END URL CONFIGURATION
......
......@@ -4,7 +4,7 @@ Settings for production server
from .base import *
update_urls('/adim/', __name__)
update_urls('/adim', __name__)
ALLOWED_HOSTS = ['.unil.ch']
......
......@@ -6,7 +6,7 @@ from .base import *
DEBUG = True
TEMPLATE_DEBUG = TEMPLATES[0]['OPTIONS']['debug'] = True
update_urls('/adim-dev/', __name__)
update_urls('/adim-dev', __name__)
ALLOWED_HOSTS = ['.unil.ch']
......
......@@ -62,7 +62,7 @@
# Shibboleth Conf
# ---------------
<IfModule mod_shib>
<Location {{ settings.BASE_URL }}shibauth/>
<Location {{ settings.BASE_URL }}/shibauth/>
#Order allow,deny
#Allow from all
AuthType shibboleth
......@@ -93,7 +93,7 @@
</Files>
</Directory>
{% if settings.BASE_URL and settings.BASE_URL != "/" %}
RedirectMatch ^{{ settings.BASE_URL|slice:"-1" }}$ {{ settings.BASE_URL }}
RedirectMatch ^{{ settings.BASE_URL }}$ {{ settings.BASE_URL }}
{% endif %}
{% endblock wsgi %}
......
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