kit
kit copied to clipboard
[adapter-node] - Use wrong ORIGIN value cause 400 Bad Request
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