middleware

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cors = 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 CorsAllowAll = 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)

Types

This section is empty.

Jump to

Keyboard shortcuts

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