cors

package
v0.0.0-...-71c52dc Latest Latest
Warning

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

Go to latest
Published: May 26, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cors provides the means for implementing the server side of CORS, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS.

Index

Constants

View Source
const OriginKey key = "origin"

OriginKey is the context key used to store the request origin match

Variables

This section is empty.

Functions

func HandlePreflight

func HandlePreflight(ctx context.Context, middleware goa.Middleware) goa.MuxHandler

HandlePreflight calls the given cors middleware and returns a simple 200 response.

func MatchOrigin

func MatchOrigin(origin, spec string) bool

MatchOrigin returns true if the given Origin header value matches the origin specification.

Types

This section is empty.

Jump to

Keyboard shortcuts

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