middlewares

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MiddlewareStack on pREST
	MiddlewareStack []negroni.Handler

	// BaseStack Middlewares
	BaseStack = []negroni.Handler{
		negroni.Handler(negroni.NewRecovery()),
		negroni.Handler(negroni.NewLogger()),
		HandlerSet(),
	}
)

Functions

func AccessControl

func AccessControl() negroni.Handler

AccessControl is a middleware to handle permissions on tables in pREST

func AuthMiddleware added in v1.0.10

func AuthMiddleware() negroni.Handler

AuthMiddleware handle request token validation

func Cors added in v1.0.10

func Cors(origin []string, headers []string) negroni.Handler

Cors middleware

func GetApp added in v1.0.10

func GetApp() *negroni.Negroni

GetApp get negroni

func HandlerSet

func HandlerSet() negroni.Handler

HandlerSet add content type header

func JwtMiddleware

func JwtMiddleware(key string, algo string) negroni.Handler

JwtMiddleware check if actual request have JWT

func MatchURL added in v1.0.10

func MatchURL(url string) (match bool, err error)

MatchURL matches the given url with a whitelist from config.core

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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