From 798ceaaa738c05ed9814c400810201485a3cc8a7 Mon Sep 17 00:00:00 2001 From: nono <np@laquadrature.net> Date: Tue, 19 Jan 2021 20:16:46 +0100 Subject: [PATCH] Added string manipulation to nginx servername variable --- files/etc/nginx/hedgedocs-nginx.conf.j2 | 4 +--- tasks/configuration.yml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/files/etc/nginx/hedgedocs-nginx.conf.j2 b/files/etc/nginx/hedgedocs-nginx.conf.j2 index 05ae994..e0556b7 100644 --- a/files/etc/nginx/hedgedocs-nginx.conf.j2 +++ b/files/etc/nginx/hedgedocs-nginx.conf.j2 @@ -3,7 +3,7 @@ map $http_upgrade $connection_upgrade { '' close; } server { - server_name {{ service_hedgedocs_domain }}; + server_name {{ service_hedgedocs_domain.split("https://")[0] | lower }}; location / { proxy_pass http://127.0.0.1:3000; @@ -29,8 +29,6 @@ server { ssl_certificate /etc/letsencrypt/live/{{ service_hedgedocs_domain }}/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/{{ service_hedgedocs_domain }}/fullchain.pem; - include options-ssl-nginx.conf; - # Improve HTTPS performance with session resumption ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; diff --git a/tasks/configuration.yml b/tasks/configuration.yml index 76f5d2b..ccf9f4d 100644 --- a/tasks/configuration.yml +++ b/tasks/configuration.yml @@ -5,7 +5,7 @@ - name: Configuration du service HedgeDocs template: src: files/config.json.j2 - dest: /home/hedgedocs/hedgedoc/onfig.json + dest: /home/hedgedocs/hedgedoc/config.json owner: hedgedocs group: www-data mode: 0644 -- GitLab