corsx

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 6 Imported by: 6

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

func Initialize(h http.Handler, l logrus.FieldLogger) http.Handler

Initialize starts the CORS middleware for a http.Handler if `viper.GetString("CORS_ENABLED") == "true"`.

func ParseOptions

func ParseOptions() cors.Options

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.

Jump to

Keyboard shortcuts

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