fix: coolify deployment build errors (missing public dir and dynamic server errors)

This commit is contained in:
mstfyldz
2026-05-30 18:47:08 +03:00
parent e927cd6af3
commit 0f53b0ba06
2 changed files with 4 additions and 1 deletions
+4 -1
View File
@@ -296,7 +296,10 @@ export async function getAdminSession() {
const token = cookieStore.get(COOKIE_NAME)?.value;
if (!token) return null;
return verifyToken(token);
} catch (error) {
} catch (error: any) {
if (error?.digest === 'DYNAMIC_SERVER_USAGE' || error?.message?.includes('Dynamic server usage')) {
throw error;
}
console.error("Error reading admin session:", error);
return null;
}