Hard coded the CORS for the EnCoach website

This commit is contained in:
Tiago Ribeiro
2024-01-11 23:10:51 +00:00
parent edbf405c30
commit 34c1041182

View File

@@ -1,27 +1,26 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: "standalone",
async headers() {
return [
{
source: "/api/packages",
headers: [
{ key: "Access-Control-Allow-Credentials", value: "false" },
{ key: "Access-Control-Allow-Origin", value: process.env.WEBSITE_URL },
{
key: "Access-Control-Allow-Methods",
value: "GET",
},
{
key: "Access-Control-Allow-Headers",
value:
"Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date",
},
],
},
];
},
reactStrictMode: true,
output: "standalone",
async headers() {
return [
{
source: "/api/packages",
headers: [
{key: "Access-Control-Allow-Credentials", value: "false"},
{key: "Access-Control-Allow-Origin", value: "https://encoach.com"},
{
key: "Access-Control-Allow-Methods",
value: "GET",
},
{
key: "Access-Control-Allow-Headers",
value: "Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date",
},
],
},
];
},
};
module.exports = nextConfig;