From 2050129062996454613f14534a34404a659589bb Mon Sep 17 00:00:00 2001 From: Asep Haryana Date: Tue, 4 Aug 2026 22:51:09 +0700 Subject: [PATCH] =?UTF-8?q?fix(infra):=20imphnen=20site=20block=20?= =?UTF-8?q?=E2=80=94=20SPA=20:5173=20+=20API=20/v1=20=E2=86=92=20:4099=20(?= =?UTF-8?q?was=20525:=20no=20block=20on=20live=20caddy)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/caddy/Caddyfile.prod | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/infra/caddy/Caddyfile.prod b/infra/caddy/Caddyfile.prod index 440a18a..52b6db5 100644 --- a/infra/caddy/Caddyfile.prod +++ b/infra/caddy/Caddyfile.prod @@ -101,7 +101,30 @@ dashboard.asepharyana.my.id { } imphnen.asepharyana.my.id { - import proxy 4009 + encode zstd gzip + header { + -Server + X-Content-Type-Options "nosniff" + X-Frame-Options "SAMEORIGIN" + Referrer-Policy "strict-origin-when-cross-origin" + } + handle /v1/* { + reverse_proxy 127.0.0.1:4099 { + transport http { + keepalive 120s + keepalive_interval 30s + max_conns_per_host 100 + dial_timeout 3s + } + } + } + handle { + # vite dev server punya host protection (Vite 6.3): tolak Host selain localhost + # → rewrite Host upstream biar page + HMR websocket diterima + reverse_proxy 127.0.0.1:5173 { + header_up Host localhost:5173 + } + } } upload.asepharyana.my.id, upload.asepharyana.web.id {