mirror of
https://github.com/Such-Software/xmrcheckout.git
synced 2026-10-17 05:51:34 +02:00
56 lines
1.4 KiB
Plaintext
56 lines
1.4 KiB
Plaintext
limit_req_zone $binary_remote_addr zone=global_rate_limit:10m rate=50r/s;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost host.docker.internal example.com;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name localhost host.docker.internal example.com;
|
|
|
|
ssl_certificate /etc/nginx/certs/dev.crt;
|
|
ssl_certificate_key /etc/nginx/certs/dev.key;
|
|
|
|
limit_req zone=global_rate_limit burst=200 nodelay;
|
|
|
|
if ($request_uri ~* "//+") {
|
|
return 308 $scheme://$host$uri$is_args$args;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://api:8000/api/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location /api {
|
|
return 301 /api/;
|
|
}
|
|
|
|
location = /openapi.json {
|
|
proxy_pass http://api:8000/openapi.json;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location /qr/ {
|
|
alias /qr/;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://ui:3000/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|