argos/deployment/proxy/ProxyNginx.conf

95 lines
3.6 KiB
Plaintext

server {
listen 8080;
server_name host.docker.internal:8081;
location ~/.well-known {
allow all;
root /var/www/html/test;
}
}
server {
listen 8081;
server_name host.docker.internal;
proxy_pass_header Server;
# add_header X-XSS-Protection "1; mode=block" always;
# add_header X-Content-Type-Options nosniff;
# add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
# add_header Referrer-Policy 'strict-origin' always;
# add_header Feature-Policy "usb 'none'; xr-spatial-tracking 'none'" always;
# add_header Permissions-Policy "geolocation=(),sync-xhr=(),microphone=(),camera=(),magnetometer=(),gyroscope=()" always;
location / {
proxy_set_header Host $host;
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 $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opencdmp.frontend:8080;
proxy_read_timeout 90;
proxy_redirect http://opencdmp.frontend:8080 http://host.docker.internal:8081;
}
location /api/ {
proxy_set_header Host $host;
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 $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opencdmp.backend:8080;
proxy_read_timeout 90;
proxy_redirect http://opencdmp.backend:8080 http://host.docker.internal:8081/api;
}
location /api/notification/ {
proxy_set_header Host $host;
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 $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opencdmp.notification:8080;
proxy_read_timeout 90;
proxy_redirect http://opencdmp.notification:8080 http://host.docker.internal:8081/api/notification;
}
location /api/annotation/ {
proxy_set_header Host $host;
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 $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opencdmp.annotation:8080;
proxy_read_timeout 90;
proxy_redirect http://opencdmp.annotation:8080 http://host.docker.internal:8081/api/annotation;
}
location /keycloak/ {
proxy_set_header Host $host;
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 $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opencdmp.keycloak:8080;
proxy_read_timeout 90;
proxy_redirect http://opencdmp.keycloak:8080 http://host.docker.internal:8081/keycloak;
}
}