Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Structured parsing of the Origin header (issue #2007) #2082
This PR improves the parsing of the
Instead of being interpreted as a string, the header is now interpreted as a list of items of type
We commonly think of the Origin as containing a single host. According to the Mozilla Developer page, however, the header may be an empty string (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin). And according to the RFC, it may contain multiple hosts (https://tools.ietf.org/html/rfc6454#section-7).
There's one last complication. The RFC technically states that