From 335579b060ea40ebd82108c6caf91569d571f4ed Mon Sep 17 00:00:00 2001 From: Ethan Cemer Date: Fri, 1 Sep 2023 15:07:33 -0500 Subject: [PATCH] *update header --- next.config.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/next.config.js b/next.config.js index f203dce..1708465 100644 --- a/next.config.js +++ b/next.config.js @@ -1,19 +1,22 @@ /** @type {import('next').NextConfig} */ const nextConfig = { async headers() { - return [ + return [ + { + source: '/', + headers: [ { - // matching all API routes - source: "/api/:path*", - headers: [ - { key: "Access-Control-Allow-Credentials", value: "true" }, - { key: "Access-Control-Allow-Origin", value: "*" }, - { key: "Access-Control-Allow-Methods", value: "GET,OPTIONS,PATCH,DELETE,POST,PUT" }, - { key: "Access-Control-Allow-Headers", value: "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }, - ] - } - ]; + key: 'Cross-Origin-Embedder-Policy', + value: 'require-corp', + }, + { + key: 'Cross-Origin-Opener-Policy', + value: 'same-origin', + }, + ], + }, + ]; }, -} + }; module.exports = nextConfig