6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-10 23:30:59 +00:00

Activate preview.localhost hostname

This allows local access to the preview endpoints. However, they should
not be used anywhere since preview.LMS_HOST is used instead.

Close #77.
This commit is contained in:
Régis Behmo 2018-10-03 09:00:04 +02:00
parent b78d285779
commit f03e120d9e
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ server {
server { server {
listen {{ "443 ssl" if ACTIVATE_HTTPS else "80" }}; listen {{ "443 ssl" if ACTIVATE_HTTPS else "80" }};
server_name localhost {{ LMS_HOST }} preview.{{ LMS_HOST }}; server_name localhost preview.localhost {{ LMS_HOST }} preview.{{ LMS_HOST }};
{% if ACTIVATE_HTTPS %} {% if ACTIVATE_HTTPS %}
ssl_certificate /etc/letsencrypt/live/{{ LMS_HOST }}/fullchain.pem; ssl_certificate /etc/letsencrypt/live/{{ LMS_HOST }}/fullchain.pem;

View File

@ -28,8 +28,8 @@ PROFILE_IMAGE_BACKEND['options']['location'] = os.path.join(MEDIA_ROOT, 'profile
ALLOWED_HOSTS = [ ALLOWED_HOSTS = [
ENV_TOKENS.get('LMS_BASE'), ENV_TOKENS.get('LMS_BASE'),
FEATURES['PREVIEW_LMS_BASE'], FEATURES['PREVIEW_LMS_BASE'],
'127.0.0.1', 'localhost', '127.0.0.1', 'localhost', 'preview.localhost',
'127.0.0.1:8000', 'localhost:8000', '127.0.0.1:8000', 'localhost:8000', 'preview.localhost:8000',
] ]
# Required to display all courses on start page # Required to display all courses on start page