From acfac5a3cf3bcb1049b9b1ebae69d9696b6499c4 Mon Sep 17 00:00:00 2001 From: Torben Haack Date: Fri, 11 Oct 2024 05:54:18 +0200 Subject: [PATCH] add cors to page --- packages/reservation-platform/next.config.mjs | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/reservation-platform/next.config.mjs b/packages/reservation-platform/next.config.mjs index 4678774..887b2d2 100644 --- a/packages/reservation-platform/next.config.mjs +++ b/packages/reservation-platform/next.config.mjs @@ -1,4 +1,26 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + async headers() { + return [ + { + source: "/:path*", + headers: [ + { + key: "Access-Control-Allow-Origin", + value: "m040tbaraspi001.de040.corpintra.net", + }, + { + key: "Access-Control-Allow-Methods", + value: "GET, POST, PUT, DELETE, OPTIONS", + }, + { + key: "Access-Control-Allow-Headers", + value: "Content-Type, Authorization", + }, + ], + }, + ]; + }, +}; export default nextConfig;