Skip to content

Commit

Permalink
Modify code to allow http only connections
Browse files Browse the repository at this point in the history
  • Loading branch information
okeneo committed Apr 18, 2024
1 parent 3f9ff5d commit 9262a35
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions nginx/default-no-ssl.prod.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ server {
server_name ${DOMAIN} www.${DOMAIN};
server_tokens off;

client_max_body_size 10M;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

location / {
return 301 http://${DOMAIN}$request_uri;
}
}

server {
listen 80;
server_name ${DOMAIN};
server_tokens off;

client_max_body_size 10M;

location / {
alias /var/www/frontend/;
try_files $uri $uri/ /index.html;
Expand All @@ -27,7 +37,7 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Url-Scheme $scheme;
}

Expand Down

0 comments on commit 9262a35

Please sign in to comment.