Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HelpMessage ¶
func HelpMessage() string
HelpMessage returns a string containing information on setting up this CORS middleware.
func Initialize ¶
Initialize starts the CORS middleware for a http.Handler if `viper.GetString("CORS_ENABLED") == "true"`.
func ParseOptions ¶
ParseOptions parses CORS settings by using the `viper` framework. The following options are parsed:
- CORS_ALLOWED_CREDENTIALS
- CORS_DEBUG
- CORS_MAX_AGE
- CORS_ALLOWED_ORIGINS
- CORS_ALLOWED_METHODS
- CORS_ALLOWED_HEADERS
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.