allow cors

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-11-04 20:19:41 +01:00
parent fe6f4a8f39
commit 853e6adbe2

View File

@@ -19,6 +19,23 @@ const config = {
locales: ['en'],
defaultLocale: 'en',
},
async headers() {
return [
{
source: '/api/sdk/:path*',
headers: [
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
{ key: 'Access-Control-Allow-Origin', value: '*' },
{ key: 'Access-Control-Allow-Methods', value: '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',
// },
],
},
];
},
};
export default config;