From ebb38edc3f3d368f8fab981c45340833aff422ea Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sat, 23 Jun 2018 22:30:47 +0200 Subject: [PATCH] Redirect to https by default --- conf/nginx.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 064826f..b8547bd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,10 @@ location / { alias __FINALPATH__/front/dist/; + + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + try_files $uri $uri/ @rewrites; }