Releases page (#5346)
closes #4103 <img width="696" alt="Bildschirmfoto 2024-05-10 um 08 16 19" src="https://github.com/twentyhq/twenty/assets/48770548/e34cd348-2522-408c-886c-636595292e0f">
This commit is contained in:
@ -1,20 +1,9 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
const allowedOrigins = [
|
||||
'http://localhost:3000',
|
||||
'https://app.twenty.com',
|
||||
'https://twenty.com',
|
||||
];
|
||||
|
||||
export function middleware(req: any) {
|
||||
export function middleware() {
|
||||
const res = NextResponse.next();
|
||||
|
||||
const origin = req.headers.get('origin');
|
||||
|
||||
if (allowedOrigins.includes(origin)) {
|
||||
res.headers.append('Access-Control-Allow-Origin', origin);
|
||||
}
|
||||
|
||||
res.headers.append('Access-Control-Allow-Origin', '*');
|
||||
res.headers.append('Access-Control-Allow-Credentials', 'true');
|
||||
res.headers.append(
|
||||
'Access-Control-Allow-Methods',
|
||||
|
||||
Reference in New Issue
Block a user