middleware

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FiberCors = cors.Config{
	AllowOrigins:     strings.Join(origins, ","),
	AllowHeaders:     strings.Join(headers, ","),
	AllowMethods:     "GET, POST, PUT, PATCH, DELETE",
	ExposeHeaders:    "Content-Length",
	AllowCredentials: true,
	MaxAge:           int((2 * time.Hour).Seconds()),
}
View Source
var FiberLocalCors = cors.Config{
	AllowOrigins:  "*",
	AllowHeaders:  strings.Join(headers, ","),
	AllowMethods:  "GET, POST, PUT, PATCH, DELETE",
	ExposeHeaders: "Content-Length",
	MaxAge:        int((2 * time.Hour).Seconds()),
}

Functions

func IsAuthenticated

func IsAuthenticated(next http.Handler) http.Handler

func JwtMiddleware

func JwtMiddleware() fiber.Handler

func LoadEnv

func LoadEnv(path string)

func StdCors added in v1.1.1

func StdCors(next http.Handler) http.Handler

func StdLocalCors added in v1.1.9

func StdLocalCors(next http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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