suppression reverse proxy

This commit is contained in:
Mathieu Oriol
2024-09-09 17:00:50 +02:00
parent cf96ea45d7
commit d6cf0e8d60
2 changed files with 0 additions and 50 deletions

View File

@@ -1,8 +0,0 @@
# nginx/Dockerfile
FROM nginx:1.23.3-alpine
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
EXPOSE 443

View File

@@ -1,42 +0,0 @@
# nginx/nginx.conf
events {
}
http {
upstream front {
server front:3000;
}
server {
# Redirect HTTP requests to HTTPS.
listen 80;
server_name localhost;
root /srv/public;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name localhost;
root /srv/public;
server_tokens off;
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
location / {
try_files $uri $uri/ @front;
}
location @front {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://front;
proxy_cookie_path / "/; HTTPOnly; Secure";
}
}
}