mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 02:10:18 +01:00
suppression reverse proxy
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
# nginx/Dockerfile
|
|
||||||
|
|
||||||
FROM nginx:1.23.3-alpine
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
EXPOSE 443
|
|
||||||
@@ -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";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user