[feat](server): add 504 Gateway Timeout support and enhance buffer handling

- Introduced `StatusGatewayTimeout` (504) for server-side timeouts between HopGate and backend.
- Implemented 504 error page with multilingual support.
- Enhanced `bufio.Reader` usage in JSON decoding to prevent "dtls: buffer too small" errors for large payloads.
- Applied request handling improvements for control domain and timeout scenarios.
This commit is contained in:
dalbodeule
2025-12-03 00:59:21 +09:00
parent bc961567e2
commit 7c751c7492
5 changed files with 165 additions and 13 deletions

View File

@@ -14,6 +14,11 @@ import (
// TLS/DTLS 핸드셰이크 실패를 나타내는 HTTP 스타일 상태 코드입니다. (예: 525)
const StatusTLSHandshakeFailed = 525
// StatusGatewayTimeout is an HTTP-style status code representing
// a gateway timeout between HopGate and the backend (similar to 504).
// HopGate 와 백엔드 간 요청이 너무 오래 걸려 타임아웃된 경우를 나타내는 상태 코드입니다. (예: 504)
const StatusGatewayTimeout = http.StatusGatewayTimeout
//go:embed templates/*.html
var embeddedTemplatesFS embed.FS