other
This commit is contained in:
@@ -26,15 +26,8 @@ export async function middleware(req: NextRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Get the origin but handle localhost differently to avoid SSL issues
|
// Always use localhost for internal container communication
|
||||||
const origin = req.nextUrl.origin;
|
const authCheckUrl = "http://localhost:3000/api/auth/check";
|
||||||
|
|
||||||
// Construct the auth check URL based on environment
|
|
||||||
// For localhost, explicitly use HTTP instead of HTTPS
|
|
||||||
const isLocalhost = origin.includes('localhost') || origin.includes('127.0.0.1');
|
|
||||||
const protocol = isLocalhost ? 'http' : 'https';
|
|
||||||
const host = req.nextUrl.host;
|
|
||||||
const authCheckUrl = `${protocol}://${host}/api/auth/check`;
|
|
||||||
|
|
||||||
console.log(`Using internal auth check URL: ${authCheckUrl}`);
|
console.log(`Using internal auth check URL: ${authCheckUrl}`);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"commitHash": "59a9063",
|
"commitHash": "bff930b",
|
||||||
"buildTime": "2025-04-06T14:50:28.182Z"
|
"buildTime": "2025-04-06T15:19:20.427Z"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user