middleware

package
v0.0.0-...-91a91da Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CrossOrigin = faygo.HandlerFunc(func(ctx *faygo.Context) error {
	ctx.SetHeader(faygo.HeaderAccessControlAllowOrigin, ctx.HeaderParam(faygo.HeaderOrigin))

	ctx.SetHeader(faygo.HeaderAccessControlAllowCredentials, "true")
	return nil
})

CrossOrigin creates Cross-Domain middleware

Functions

func NewIPFilter

func NewIPFilter(whitelist []string, realIP bool) faygo.HandlerFunc

NewIPFilter creates middleware that intercepts the specified IP prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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