Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Enhancements to origin(s) property #97

@linuxwolf

Description

@linuxwolf

The current input validation for origins allows the value of each array element to be any string under 500 characters. However, this has implications that complicate other implementations (e.g., more complete site-name/origin matching).

In essence, the idea is for the datastore to help follow this gist.

  • At a minimum, the resulting value of each array element in origins must match {scheme}//{hostname}/{path}?{query}#{hash}; /{path}, ?{query}, and #{hash} are optional.

  • In addition to the search hashes called for in the gist, a search hash for the complete value is also generated if a /{path}, ?{query}, or #{hash} are present.

  • When adding an item, any origins present are coerced into the above pattern; if the array element does not match the pattern then it is treated as a if it were a simple domain name (prepending it with "https://" and ending with "/").

  • Existing data is coerced into this pattern when updating items

  • When retrieving items, it may coerce any origins values into the above format

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions