fix: add header cors for well-known public folder

This commit is contained in:
2025-05-06 18:17:06 +02:00
parent b9b9ef6359
commit 120f166a45

View File

@@ -5,17 +5,31 @@ const config = {
};
const nextConfig = {
output: 'standalone',
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
port: '',
pathname: '/**',
},
],
output: 'standalone',
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
port: '',
pathname: '/**',
},
],
},
async headers() {
return [
{
// matching all well-known routes
source: "/.well-known/:path*",
headers: [
// { key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Origin", value: "*" },
{ key: "Access-Control-Allow-Methods", value: "GET" },
// { 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 withPWA(config)(nextConfig);