Function urlIsAllowedOriginFactory
- urlIsAllowedOriginFactory(trustedOriginUrls): Function
Parameters
- trustedOriginUrls: string[]
Returns Function
- A function that receives a URL (string or parsed URL object) and returns
whether it is of an allowed origin.
Create a function that can check a URL's origin against a list of allowed/trusted origins. The current location's origin is implicitly trusted.