cors

package
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: MIT, MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default() iris.RouterWrapperPolicy

Default returns a New cors wrapper with the default options accepting GET and POST requests and allowing all origins.

func New

New returns a new cors router wrapper policy with the provided options.

create a new cors middleware, pass its options (casted) and pass the .ServeHTTP(w,r,next(http.HandlerFunc)) as the wrapper for the whole iris' Router

Unlike the cors middleware, this wrapper wraps the entirely router, it cannot be registered to specific routes. It works better and all Options are working.

Types

type Options

type Options cors.Options

Options is a configuration container to setup the CORS.

Jump to

Keyboard shortcuts

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