Skip to content

Commit

Permalink
handle cloudflare redirectoin
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloose committed Sep 16, 2024
1 parent 848ed86 commit b02f719
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docker/prod/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ server {
server_name ${DOMAIN_NAME} ${WEB_DOMAIN_NAME};

location / {
if ($http_server = "cloudflare") {
proxy_pass http://burrito_server:6969;
proxy_http_version 1.1;
proxy_read_timeout 360s;
proxy_buffering off;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
}

return 301 https://$host$request_uri;
}
}
Expand Down

0 comments on commit b02f719

Please sign in to comment.