Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OriginValidator ¶
type OriginValidator struct {
// contains filtered or unexported fields
}
func NewOriginValidator ¶
func NewOriginValidator(startUrl *url.URL, allowedOriginsString string) *OriginValidator
NewOriginValidator creates a new validator from a comma-separated string of allowed origins
func (*OriginValidator) GetOriginFromURL ¶
func (v *OriginValidator) GetOriginFromURL(urlString string) (string, error)
GetOriginFromURL extracts origin from URL string
func (*OriginValidator) IsOriginAllowed ¶
func (v *OriginValidator) IsOriginAllowed(origin string) bool
IsOriginAllowed checks if the given origin is allowed
Click to show internal directories.
Click to hide internal directories.