From e5f5dee005ab45e58c5a512156b5c773dbea32f1 Mon Sep 17 00:00:00 2001 From: Junkov0 Date: Mon, 10 Aug 2026 17:59:23 +0900 Subject: [PATCH] fix: trust X-Forwarded-Proto/Host from the nginx load balancer Set server.forward-headers-strategy=framework so requests proxied through the nginx LB over HTTPS are recognized as secure by the app (correct OAuth2 redirect URIs, secure-cookie detection), instead of always looking like plain HTTP. --- momogo-api/src/main/resources/application.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/momogo-api/src/main/resources/application.yaml b/momogo-api/src/main/resources/application.yaml index bc734a5..82e5d66 100644 --- a/momogo-api/src/main/resources/application.yaml +++ b/momogo-api/src/main/resources/application.yaml @@ -152,6 +152,9 @@ app: server: port: 8080 + # nginx-lb가 X-Forwarded-Proto/Host로 보내주는 원본 스킴(https)을 신뢰하도록 설정. + # 없으면 LB 뒤에서 https로 들어와도 애플리케이션은 http로 인식해 OAuth2 리다이렉트/secure 쿠키 판단이 꼬인다. + forward-headers-strategy: framework # monitoring management: