Skip to content

[adapter-node] - Use wrong ORIGIN value cause 400 Bad Request #14978

@KiraPC

Description

@KiraPC

Describe the bug

Hello

If the ORIGIN environment variable is configured incorrectly, for example omitting the protocol, the server responds with a 400 Bad Request error.

While this is a configuration issue, returning a Bad Request may be misleading, since the HTTP request itself is not actually malformed. A more descriptive error message would greatly help with debugging and improve the developer experience.

Reproduction

Start node server with

ORIGIN=localhost:3000 node build/

Logs

System Info

MacOs

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributions-welcomeWe're not going to implement this ourselves, but we'll consider contributionsp3-edge-caseSvelteKit cannot be used in an uncommon way

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions