diff --git a/frontend/nginx.conf b/frontend/nginx.conf
index 7b46eaa..2087d8c 100644
--- a/frontend/nginx.conf
+++ b/frontend/nginx.conf
@@ -24,6 +24,14 @@ server {
try_files $uri =404;
}
+ location /hk-planner/api/auth/ {
+ proxy_pass http://10.10.10.101:3001/api/auth/;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ add_header Cache-Control "no-store";
+ }
+
location /hk-planner/api/ {
proxy_pass http://backend:3001/api/;
proxy_set_header Host $host;
diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx
index dbea2d4..d922e50 100644
--- a/frontend/src/components/Layout.tsx
+++ b/frontend/src/components/Layout.tsx
@@ -13,8 +13,8 @@ export function Layout({ user, children }: Props) {
useFrameViewport('desktop')
async function logout() {
- await fetch('/api/auth/logout', { method: 'POST', credentials: 'include' })
- window.location.href = '/'
+ await fetch('/hk-planner/api/auth/logout', { method: 'POST', credentials: 'include' })
+ window.location.reload()
}
return (
@@ -29,7 +29,6 @@ export function Layout({ user, children }: Props) {
{user.name}