allow all cors...

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-04-23 10:39:17 +02:00
parent c63c83e866
commit 288fd6f6d0

View File

@@ -33,17 +33,8 @@ const startServer = async () => {
maxParamLength: 5000,
});
const origin = [];
if (process.env.NODE_ENV === 'production') {
if (process.env.NEXT_PUBLIC_DASHBOARD_URL) {
origin.push(process.env.NEXT_PUBLIC_DASHBOARD_URL);
}
} else {
origin.push('http://localhost:3000');
}
fastify.register(cors, {
origin,
origin: '*',
credentials: true,
});