Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultAllowHeaders = []string{"authorization", "token", "content-type", "x-requested-with"} DefaultAllowMethods = []string{http.MethodPost, http.MethodGet, http.MethodPut, http.MethodDelete, http.MethodOptions, http.MethodPatch} )
Functions ¶
func DefaultCors ¶
Types ¶
type CorsConfig ¶
type CorsConfig struct { AllowOrigins []string AllowAnyOrigin bool AllowMethods []string AllowHeaders []string AllowCredentials bool }
func DefaultCorsConfig ¶
func DefaultCorsConfig() *CorsConfig
Click to show internal directories.
Click to hide internal directories.