Skip to content

Commit 4b91133

Browse files
committed
refactor: 로그인 리다이렉트 uri 조정
1 parent d814740 commit 4b91133

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

nginx.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ server {
6161
proxy_set_header X-Forwarded-Port $server_port;
6262
}
6363

64+
# OAuth2 로그인 리다이렉트 처리 (Spring Security가 처리하는 기본 경로)
65+
location /login/oauth2/ {
66+
proxy_pass ${VITE_API_URL}/login/oauth2/;
67+
proxy_set_header Host $host;
68+
proxy_set_header X-Real-IP $remote_addr;
69+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
70+
proxy_set_header X-Forwarded-Proto $scheme;
71+
}
72+
6473
# 정적 자산 캐싱
6574
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg)$ {
6675
expires 1y;

nginx.conf.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ server {
6363
proxy_set_header X-Forwarded-Port $server_port;
6464
}
6565

66+
# OAuth2 로그인 리다이렉트 처리 (Spring Security가 처리하는 기본 경로)
67+
location /login/oauth2/ {
68+
proxy_pass ${VITE_API_URL}/login/oauth2/;
69+
proxy_set_header Host $host;
70+
proxy_set_header X-Real-IP $remote_addr;
71+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
72+
proxy_set_header X-Forwarded-Proto $scheme;
73+
}
74+
6675
# 정적 자산 캐싱
6776
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg)$ {
6877
expires 1y;

0 commit comments

Comments
 (0)