Don't always force override headers
This commit is contained in:
parent
555990a5ad
commit
861d682383
1 changed files with 5 additions and 1 deletions
|
|
@ -17,7 +17,11 @@ const securityHeaders = {
|
|||
export const handle: Handle = async ({ event, resolve }) => {
|
||||
const response = await resolve(event);
|
||||
Object.entries(securityHeaders).forEach(
|
||||
([header, value]) => response.headers.set(header, value)
|
||||
([header, value]) => {
|
||||
if (!response.headers.has(header)) {
|
||||
response.headers.set(header, value)
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
response.headers.delete("x-sveltekit-page")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue