Documentation ¶
Overview ¶
Package internal hides all implementation details of packages github.com/jub0bs/fcors and github.com/jub0bs/fcors/risky.
Index ¶
- type Config
- type Middleware
- type Option
- func DangerouslyTolerateInsecureOrigins() Option
- func DangerouslyTolerateSubdomainsOfPublicSuffixes() Option
- func ExposeResponseHeaders(one string, others ...string) Option
- func FromOrigins(one string, others ...string) Option
- func MaxAgeInSeconds(delta uint) Option
- func PreflightSuccessStatus(status uint) Option
- func PrivateNetworkAccess() Option
- func PrivateNetworkAccessInNoCORSModeOnly() Option
- func WithAnyMethod() Option
- func WithAnyRequestHeaders() Option
- func WithMethods(one string, others ...string) Option
- func WithRequestHeaders(one string, others ...string) Option
- type OptionAnon
- type TempConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // A nil ACAO indicates that the corresponding header // is set dynamically. ACAO []string ACAM []string Corpus origin.Corpus ACAH []string ACMA []string PreflightSuccessStatus int AllowAnyMethod bool AllowAnyRequestHeaders bool AllowAnyOrigin bool AllowCredentials bool ExposeAllResponseHeaders bool PrivateNetworkAccess bool PrivateNetworkAccessInNoCORSModeOnly bool ACEH []string // contains filtered or unexported fields }
type Middleware ¶
func NewMiddleware ¶ added in v0.6.0
func NewMiddleware[A applier](cred bool, one A, others ...A) (Middleware, error)
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func DangerouslyTolerateInsecureOrigins ¶ added in v0.9.0
func DangerouslyTolerateInsecureOrigins() Option
func DangerouslyTolerateSubdomainsOfPublicSuffixes ¶ added in v0.9.0
func DangerouslyTolerateSubdomainsOfPublicSuffixes() Option
func ExposeResponseHeaders ¶
func FromOrigins ¶
func MaxAgeInSeconds ¶
func PreflightSuccessStatus ¶
func PrivateNetworkAccess ¶
func PrivateNetworkAccess() Option
func PrivateNetworkAccessInNoCORSModeOnly ¶ added in v0.9.0
func PrivateNetworkAccessInNoCORSModeOnly() Option
func WithAnyMethod ¶
func WithAnyMethod() Option
func WithAnyRequestHeaders ¶
func WithAnyRequestHeaders() Option
func WithMethods ¶
func WithRequestHeaders ¶
type OptionAnon ¶
type OptionAnon interface {
// contains filtered or unexported methods
}
func ExposeAllResponseHeaders ¶
func ExposeAllResponseHeaders() OptionAnon
func FromAnyOrigin ¶
func FromAnyOrigin() OptionAnon
type TempConfig ¶
type TempConfig struct { PublicSuffixes []string InsecureOriginPatterns []string SingleNonWildcardOrigin string AllowedMethods util.Set[string] AllowedRequestHeaders util.Set[string] CustomPreflightSuccessStatus bool DangerouslyTolerateSubdomainsOfPublicSuffixes bool DangerouslyTolerateInsecureOrigins bool FromOriginsCalled bool WithMethodsCalled bool WithRequestHeadersCalled bool MaxAgeInSecondsCalled bool ExposeResponseHeadersCalled bool }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package origin implements parsing of origins and origin patterns and provides data structures useful for representing a set of origins.
|
Package origin implements parsing of origins and origin patterns and provides data structures useful for representing a set of origins. |
Package radix provides an implementation of a specialized radix tree.
|
Package radix provides an implementation of a specialized radix tree. |
Package util provides a generic type representing a mathematical set, and convenience functions for generating error values for packages github.com/jub0bs/fcors and github.com/jub0bs/fcors/risky.
|
Package util provides a generic type representing a mathematical set, and convenience functions for generating error values for packages github.com/jub0bs/fcors and github.com/jub0bs/fcors/risky. |
Click to show internal directories.
Click to hide internal directories.