mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 12:43:12 +03:00
Some checks are pending
Create and publish a Docker image / build-and-push-server (push) Waiting to run
Create and publish a Docker image / build-and-push-chart (push) Waiting to run
Create and publish a Docker image / build-and-push-CR (push) Waiting to run
Deploy docs / deploy (push) Waiting to run
85 lines
No EOL
2.5 KiB
Nginx Configuration File
85 lines
No EOL
2.5 KiB
Nginx Configuration File
events { }
|
|
|
|
http {
|
|
limit_req_zone $binary_remote_addr zone=kekkai:10m rate=10r/s;
|
|
# Change the number '10' to your own, to change the threshold number for rate limit
|
|
|
|
upstream server_backend {
|
|
server server:3000;
|
|
}
|
|
|
|
upstream chart_backend {
|
|
server chart:3030;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost; # Your domain
|
|
|
|
limit_req zone=kekkai;
|
|
|
|
return 301 https://$host$request_uri$is_args$args;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name localhost; # Your domain
|
|
|
|
ssl_certificate /etc/nginx/ssl/fullchain.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
|
|
|
|
limit_req zone=kekkai;
|
|
|
|
location / {
|
|
limit_req zone=kekkai burst=4;
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
proxy_pass http://server_backend;
|
|
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;
|
|
}
|
|
|
|
location /api/getRate {
|
|
limit_req zone=kekkai burst=4;
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
proxy_pass http://server_backend;
|
|
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;
|
|
}
|
|
|
|
location /api/getChart {
|
|
limit_req zone=kekkai burst=4;
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
proxy_pass http://chart_backend;
|
|
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;
|
|
}
|
|
|
|
location /static/chart {
|
|
limit_req zone=kekkai burst=4;
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
proxy_pass http://chart_backend;
|
|
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;
|
|
}
|
|
|
|
location /robots.txt {
|
|
alias /etc/nginx/robots.txt;
|
|
}
|
|
|
|
location /favicon.ico {
|
|
alias /etc/nginx/assets/logo.png;
|
|
}
|
|
}
|
|
} |