wapi

package
v0.0.0-...-9008a76 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DevMiddleware

func DevMiddleware() gin.HandlerFunc

DevMiddleware sets up a permisive CORS Middleware to allow frontend apis served in different port to access the web apis.

func GetCSRFToken

func GetCSRFToken(c *gin.Context)

GetCSRFToken returns a payload of the csrf_token

func Middleware

func Middleware() gin.HandlerFunc

Middleware sets up a restrictive CORS Middleware and some extra headers

func Use

func Use(r gin.IRouter, devMode bool)

Use makes use of the WAPIMiddleware

Types

This section is empty.

Jump to

Keyboard shortcuts

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