middleware

package
v0.0.0-...-ec76f1a Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Middlewares = defaultMiddlewares()

Middlewares store registered middlewares.

Functions

func Context

func Context() iris.Handler

Context is a middleware that injects common prefix fields to gin.Context.

func Cors

func Cors() iris.Handler

Cors add cors headers.

func NoCache

func NoCache(c iris.Context)

NoCache is a middleware function that appends headers to prevent the client from caching the HTTP response.

func Options

func Options(c iris.Context)

Options is a middleware function that appends headers for options requests and aborts then exits the middleware chain and ends the request.

func RequestID

func RequestID() context.Handler

RequestID is a middleware that injects a 'X-Request-ID' into the context and request/response header of each request.

func Secure

func Secure(c iris.Context)

Secure is a middleware function that appends security and resource access headers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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