Skip to content

Node adapter sends Vary: Accept-Encoding even when not applicable #10343

@xamir82

Description

@xamir82

Describe the bug

The Node adapter currently sends back the Vary: Accept-Encoding header as part of the response (when files under /_app like .js and .css files are requested) even when the precompress configuration option is false; meaning even when the response won't vary based on the Accept-Encoding header of the request, which is what Vary: Accept-Encoding is supposed to indicate.

In summary, adapter-node should not include Vary: Accept-Encoding in the response if precompress: false.

Reproduction

Just build a SvelteKit Demo App with adapter-node and send a request using curl -i to some CSS/JS file, and examine the response headers.

Logs

No response

System Info

-

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions