fix: cdn.hotelsync.ru nginx config + RoomModal key for state reset
- Add cdn.hotelsync.ru server block to nginx config (serves /var/www/uploads)
- Add cdn.hotelsync.ru to HTTP redirect server_name
- RoomModal: add key={editingRoom?.id ?? 'new'} to force state reinit on room change
- RoomModal: remove categories[0] fallback for categoryId (show 'Без категории' instead)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# ── Редирект HTTP → HTTPS ─────────────────────────────────────────────────
|
||||
server {
|
||||
listen 80;
|
||||
server_name hotelsync.ru www.hotelsync.ru app.hotelsync.ru api.hotelsync.ru git.hotelsync.ru guest.hotelsync.ru cp.hotelsync.ru;
|
||||
server_name hotelsync.ru www.hotelsync.ru app.hotelsync.ru api.hotelsync.ru git.hotelsync.ru guest.hotelsync.ru cp.hotelsync.ru cdn.hotelsync.ru;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
@@ -115,6 +115,25 @@ server {
|
||||
}
|
||||
}
|
||||
|
||||
# ── cdn.hotelsync.ru — Static file CDN (uploads) ─────────────────────────
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name cdn.hotelsync.ru;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/cdn.hotelsync.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/cdn.hotelsync.ru/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
add_header Access-Control-Allow-Origin '*' always;
|
||||
add_header Cache-Control 'public, max-age=31536000, immutable' always;
|
||||
|
||||
location / {
|
||||
root /var/www/uploads;
|
||||
try_files $uri =404;
|
||||
}
|
||||
}
|
||||
|
||||
# ── git.hotelsync.ru — Gitea ──────────────────────────────────────────────
|
||||
server {
|
||||
listen 443 ssl;
|
||||
|
||||
Reference in New Issue
Block a user