Fix auth URLs to use relative paths instead of absolute NEXT_PUBLIC_API_URL
Some checks failed
continuous-integration/drone/push Build is failing

- Change login page to use /api/auth/login/ instead of absolute URL
- Change register page to use /api/auth/register/ instead of absolute URL
- This fixes the 404 error with /auth/undefined/api/auth/login/ path
- Now uses Next.js rewrites from next.config.js correctly
This commit is contained in:
2025-11-08 19:40:33 +09:00
parent e82f0f8e6f
commit 2b217ded53
2 changed files with 2 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ export default function LoginPage() {
setApiError(null)
try {
const res = await fetch(
`${process.env.NEXT_PUBLIC_API_URL}/api/auth/login/`,
`/api/auth/login/`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },