mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 04:33:11 +03:00
feat(nginx): redirect http to https and allow cors. Deleted route /api/configuration
This commit is contained in:
parent
82ad228c1a
commit
f1f26889ea
1 changed files with 4 additions and 57 deletions
61
nginx.conf
61
nginx.conf
|
@ -18,53 +18,7 @@ http {
|
||||||
|
|
||||||
limit_req zone=kekkai;
|
limit_req zone=kekkai;
|
||||||
|
|
||||||
location / {
|
return 301 https://$host$request_uri$is_args$args;
|
||||||
limit_req zone=kekkai burst=4;
|
|
||||||
|
|
||||||
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/configuration {
|
|
||||||
limit_req zone=kekkai burst=4;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
@ -79,16 +33,7 @@ http {
|
||||||
location / {
|
location / {
|
||||||
limit_req zone=kekkai burst=4;
|
limit_req zone=kekkai burst=4;
|
||||||
|
|
||||||
proxy_pass http://server_backend;
|
add_header Access-Control-Allow-Origin *;
|
||||||
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/configuration {
|
|
||||||
limit_req zone=kekkai burst=4;
|
|
||||||
|
|
||||||
proxy_pass http://server_backend;
|
proxy_pass http://server_backend;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
@ -99,6 +44,7 @@ http {
|
||||||
location /api/getChart {
|
location /api/getChart {
|
||||||
limit_req zone=kekkai burst=4;
|
limit_req zone=kekkai burst=4;
|
||||||
|
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
proxy_pass http://chart_backend;
|
proxy_pass http://chart_backend;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
@ -109,6 +55,7 @@ http {
|
||||||
location /static/chart {
|
location /static/chart {
|
||||||
limit_req zone=kekkai burst=4;
|
limit_req zone=kekkai burst=4;
|
||||||
|
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
proxy_pass http://chart_backend;
|
proxy_pass http://chart_backend;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue