Skip to content

Blacklist fetch response headers when serialised for initial fetch #1971

Description

@tanhauhau

Describe the problem

when serialise the fetch response into <script type="application/json" data-type="svelte-data">, it includes the fetch response header, which includes headers that is always changed:

  • Date

which makes the html content hash different, even though the api response body and svelte rendered content is the same

Describe the proposed solution

blacklist some of the response header when serialised

Alternatives considered

use serverFetch hook to overwrite fetch behavior on server, and remove the Date response header

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changefetch-headersissues relating to server-side `fetch` headersp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions