Compare commits
2 Commits
52711085d5
...
f3d437826e
| Author | SHA1 | Date | |
|---|---|---|---|
| f3d437826e | |||
| 23e985d33a |
@@ -15,6 +15,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro,z
|
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro,z
|
||||||
- ./proxy/html:/usr/share/nginx/html:ro,z
|
- ./proxy/html:/usr/share/nginx/html:ro,z
|
||||||
|
- ./certs/live:/etc/nginx/certs:ro,z
|
||||||
|
|
||||||
backend-a:
|
backend-a:
|
||||||
image: nginx:1.27-alpine
|
image: nginx:1.27-alpine
|
||||||
|
|||||||
+27
-16
@@ -31,6 +31,33 @@ http {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 301 https://$host:8443$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /healthz {
|
||||||
|
default_type text/plain;
|
||||||
|
return 200 "ok\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /internal/status {
|
||||||
|
access_log off;
|
||||||
|
default_type text/plain;
|
||||||
|
|
||||||
|
if ($remote_addr != 127.0.0.1) {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 200 "internal ok\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name localhost;
|
||||||
|
ssl_certificate /etc/nginx/certs/localhost.crt;
|
||||||
|
ssl_certificate_key /etc/nginx/certs/localhost.key;
|
||||||
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
add_header X-Frame-Options "DENY" always;
|
add_header X-Frame-Options "DENY" always;
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||||
@@ -68,21 +95,5 @@ http {
|
|||||||
proxy_set_header X-Forwarded-Proto http;
|
proxy_set_header X-Forwarded-Proto http;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /healthz {
|
|
||||||
default_type text/plain;
|
|
||||||
return 200 "ok\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /internal/status {
|
|
||||||
access_log off;
|
|
||||||
default_type text/plain;
|
|
||||||
|
|
||||||
if ($remote_addr != 127.0.0.1) {
|
|
||||||
return 403;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 200 "internal ok\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user