Merge branch 'BATON-006-frontend_dev'
This commit is contained in:
commit
75a41c56b8
1 changed files with 18 additions and 2 deletions
|
|
@ -55,16 +55,32 @@ server {
|
|||
|
||||
# Заголовки X-Telegram-Bot-Api-Secret-Token НЕ логируются —
|
||||
# они передаются только в proxy_pass и не попадают в access_log.
|
||||
location / {
|
||||
|
||||
# API → FastAPI
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
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;
|
||||
|
||||
# Таймауты для webhook-запросов от Telegram
|
||||
proxy_read_timeout 30s;
|
||||
proxy_send_timeout 30s;
|
||||
proxy_connect_timeout 5s;
|
||||
}
|
||||
|
||||
# Health → FastAPI
|
||||
location /health {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
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;
|
||||
}
|
||||
|
||||
# Статика фронтенда (SPA)
|
||||
location / {
|
||||
root /opt/baton/frontend;
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue