Documentation
¶
Index ¶
- func EqualURLs(first, second *url.URL) bool
- func HasDomainSuffix(domain, domainSuffix string) bool
- func HasURIDomainSuffix(uri *url.URL, domainSuffix string) bool
- func IsURISafeRedirection(uri *url.URL, domain string) bool
- func IsURISecure(uri *url.URL) bool
- func URLPathFullClean(u *url.URL) (output string)
- func ValidateURL(u *url.URL) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualURLs ¶
EqualURLs returns true if the two *url.URL values are effectively equal taking into consideration web normalization.
func HasDomainSuffix ¶
HasDomainSuffix returns true if the URI hostname is equal to the domain or if it has a suffix of the domain prefixed with a period.
func HasURIDomainSuffix ¶
HasURIDomainSuffix returns true if the URI hostname is equal to the domain suffix or if it has a suffix of the domain suffix prefixed with a period.
func IsURISafeRedirection ¶
IsURISafeRedirection returns true if the URI passes the IsURISecure and HasURIDomainSuffix, i.e. if the scheme is secure and the given URI has a hostname that is either exactly equal to the given domain or if it has a suffix of the domain prefixed with a period.
func IsURISecure ¶
IsURISecure returns true if the URI has a secure schemes (https or wss).
func URLPathFullClean ¶
URLPathFullClean returns a URL path with the query parameters appended (full path) with the path portion parsed through path.Clean given a *url.URL.
func ValidateURL ¶
Types ¶
This section is empty.