klg-asutk-app/demo/Caddyfile
Yuriy 0a19a03b6e fix: seed data, API 500 errors, security hardening
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 21:35:22 +03:00

54 lines
1.1 KiB
Caddyfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# КЛГ АСУ ТК — Caddy reverse proxy
# DEMO_DOMAIN задаётся в docker-compose (по умолчанию localhost)
# Для HTTPS с реальным доменом задайте DEMO_DOMAIN=demo.klg.refly.ru
{env.DEMO_DOMAIN} {
# Frontend (Next.js)
reverse_proxy frontend:3000
# Backend API
handle /api/* {
reverse_proxy backend:8000
}
# WebSocket
handle /ws/* {
reverse_proxy backend:8000
}
# Swagger docs
handle /docs {
reverse_proxy backend:8000
}
handle /redoc {
reverse_proxy backend:8000
}
handle /openapi.json {
reverse_proxy backend:8000
}
# Keycloak (если запущен)
handle /auth/* {
reverse_proxy keycloak:8080
}
# Security headers
header {
X-Content-Type-Options nosniff
X-Frame-Options DENY
Referrer-Policy strict-origin-when-cross-origin
-Server
}
# Сжатие
encode gzip zstd
# Логи
log {
output file /data/access.log {
roll_size 10mb
roll_keep 5
}
}
}