weborigin

package
v0.0.0-...-93e11d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrigin

func GetOrigin(ctx context.Context, url *url.URL) (string, error)

GetOrigin is like GetWebOrigin but it also accepts non-web URLs, like custom URL schemes for apps.

func GetWebOrigin

func GetWebOrigin(ctx context.Context, url *url.URL) (string, error)

GetWebOrigin takes a URL and returns a string to use to match web origins. The definition of the web origin is quite complex so you should refer to the test cases of this lib to see how it works.

func MustGetWebOrigin

func MustGetWebOrigin(ctx context.Context, in *url.URL) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL