middlewares: github.com/prest/middlewares Index | Files

package middlewares

import "github.com/prest/middlewares"

Index

Package Files

config.go middlewares.go utils.go

Variables

var (

    // MiddlewareStack on pREST
    MiddlewareStack []negroni.Handler

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

func AccessControl Uses

func AccessControl() negroni.Handler

AccessControl is a middleware to handle permissions on tables in pREST

func Cors Uses

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

Cors middleware

func GetApp Uses

func GetApp() *negroni.Negroni

GetApp get negroni

func HandlerSet Uses

func HandlerSet() negroni.Handler

HandlerSet add content type header

func JwtMiddleware Uses

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

JwtMiddleware check if actual request have JWT

Package middlewares imports 13 packages (graph) and is imported by 2 packages. Updated 2018-09-28. Refresh now. Tools for package owners.