redirects

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRawRedirectURI

func GetRawRedirectURI(u *url.URL) string

GetRawRedirectURI returns raw redirect_uri value from query parameters.

func GetRedirectURI

func GetRedirectURI(u *url.URL) *url.URL

GetRedirectURI returns redirect_uri value from query parameters.

func HasRedirectURI

func HasRedirectURI(u *url.URL) bool

HasRedirectURI check whether URL has redirect_uri in query parameters.

func Match

func Match(u *url.URL, cfgs []*RedirectURIMatchConfig) bool

Match matches HTTP URL to the bypass configuration.

func ParseRedirectURI

func ParseRedirectURI(s string) (*url.URL, error)

ParseRedirectURI parses redirect_uri from URL string.

Types

type RedirectURIMatchConfig

type RedirectURIMatchConfig struct {
	PathMatchType   string `json:"path_match_type,omitempty" xml:"path_match_type,omitempty" yaml:"path_match_type,omitempty"`
	Path            string `json:"path,omitempty" xml:"path,omitempty" yaml:"path,omitempty"`
	DomainMatchType string `json:"domain_match_type,omitempty" xml:"domain_match_type,omitempty" yaml:"domain_match_type,omitempty"`
	Domain          string `json:"domain,omitempty" xml:"domain,omitempty" yaml:"domain,omitempty"`
	// contains filtered or unexported fields
}

RedirectURIMatchConfig holds the configuration for a redirect URI.

func NewRedirectURIMatchConfig

func NewRedirectURIMatchConfig(domainMatchType, domain, pathMatchType, path string) (*RedirectURIMatchConfig, error)

NewRedirectURIMatchConfig return an instance of *RedirectURIMatchConfig.

func (*RedirectURIMatchConfig) Validate

func (c *RedirectURIMatchConfig) Validate() error

Validate validates RedirectURIMatchConfig.

Jump to

Keyboard shortcuts

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