Hard coded the CORS for the EnCoach website
This commit is contained in:
@@ -1,27 +1,26 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: "/api/packages",
|
source: "/api/packages",
|
||||||
headers: [
|
headers: [
|
||||||
{ key: "Access-Control-Allow-Credentials", value: "false" },
|
{key: "Access-Control-Allow-Credentials", value: "false"},
|
||||||
{ key: "Access-Control-Allow-Origin", value: process.env.WEBSITE_URL },
|
{key: "Access-Control-Allow-Origin", value: "https://encoach.com"},
|
||||||
{
|
{
|
||||||
key: "Access-Control-Allow-Methods",
|
key: "Access-Control-Allow-Methods",
|
||||||
value: "GET",
|
value: "GET",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "Access-Control-Allow-Headers",
|
key: "Access-Control-Allow-Headers",
|
||||||
value:
|
value: "Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date",
|
||||||
"Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date",
|
},
|
||||||
},
|
],
|
||||||
],
|
},
|
||||||
},
|
];
|
||||||
];
|
},
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = nextConfig;
|
module.exports = nextConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user