Skip to content

Proposal for an Origin object. #11534

@mikewest

Description

@mikewest

What problem are you trying to solve?

Origins are the fundamental currency of the web's security model, and we work with them in a variety of APIs. However, we do so only as serialized strings: this can complicate comparisons, leading to security problems.

What solutions exist today?

Direct comparisons of serialized origins are straightforward. A variety of libraries exist that aim to enable more complicated comparisons; it's certainly possible to do so correctly in userland, if non-trivial.

How would you solve it?

https://mikewest.github.io/origin-api/ sketches an Origin object, with some additional examples and potential extensions in an explainer.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions