mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
60 lines
1.5 KiB
Text
60 lines
1.5 KiB
Text
upstream frontend {
|
|
server frontend:5173;
|
|
}
|
|
|
|
upstream backend {
|
|
server backend:3000;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
#FOR PROD
|
|
#listen 443 ssl; # Listen for SSL at port 443 as well
|
|
|
|
location /api {
|
|
rewrite /backend/(.*) /$1 break;
|
|
proxy_pass http://backend;
|
|
}
|
|
|
|
location /socket.io {
|
|
rewrite /backend/(.*) /$1 break;
|
|
proxy_pass http://backend;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_hide_header 'Access-Control-Allow-Origin';
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://frontend;
|
|
}
|
|
|
|
#FOR PROD
|
|
# If a user tries to come through http, redirect them through https
|
|
#if ($scheme != "https") {
|
|
# return 301 https://$host$request_uri;
|
|
#}
|
|
|
|
|
|
#TEST DE CONFIG PROD
|
|
#server {
|
|
#listen 443 ssl http2;
|
|
#ssl_protocols TLSv1.2 TLSv1.3;
|
|
#ssl_prefer_server_ciphers on;
|
|
#ssl_ciphers ECDH+AESGCM:ECDH+AES256-CBC:ECDH+AES128-CBC:DH+3DES:!ADH:!AECDH:!MD5;
|
|
#ssl_certificate ...;
|
|
#ssl_certificate_key ...;
|
|
#ssl_dhparam /etc/nginx/certs/dhparam.pem;
|
|
#ssl_stapling on;
|
|
#ssl_stapling_verify on;
|
|
#ssl_trusted_certificate /etc/nginx/certs/lets-encrypt-x3-cross-signed.pem;
|
|
#ssl_session_cache shared:SSL:40m;
|
|
#ssl_session_timeout 4h;
|
|
#ssl_session_tickets on;
|
|
|
|
#add_header Strict-Transport-Security "max-age=31536000" always;
|
|
#}
|
|
|
|
}
|