You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are finding the configuration for globalHeaders is not rendering when we hard hit a path. So hitting the / root does not return the configured response headers, however subsequent navigations within the SPA svelte kit application does render the response headers. Hard hitting other than root say /support also fails to render the configured response headers.
svelte.config.js
// SvelteKit configuration with Azure adapter
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
// Use the Azure adapter with custom networking configuration
adapter: azure({
customStaticWebAppConfig: {
// @ts-ignore
networking: {
allowedIpRanges // Dynamically set allowed IP ranges from environment variable
},
globalHeaders: {"Access-Control-Allow-Origin": "*.mydomain.com.au"}
}
})
}
};
We could remove the configuration from here and set the headers in a hooks.sever.ts file, however prefer to be able to configure it in the adapter if possible.
Can you please advise if we are missing something in our configuration or if this is a confirmed bug you can fix.
Thank you
The text was updated successfully, but these errors were encountered:
Hello! Can you please provide a minimal reproduction repo that shows the issue? the Svelte config is helpful but it's easiest to have a complete example
Hi,
We are finding the configuration for globalHeaders is not rendering when we hard hit a path. So hitting the / root does not return the configured response headers, however subsequent navigations within the SPA svelte kit application does render the response headers. Hard hitting other than root say /support also fails to render the configured response headers.
svelte.config.js
We could remove the configuration from here and set the headers in a hooks.sever.ts file, however prefer to be able to configure it in the adapter if possible.
Can you please advise if we are missing something in our configuration or if this is a confirmed bug you can fix.
Thank you
The text was updated successfully, but these errors were encountered: