secure

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BodyDump

func BodyDump() echo.MiddlewareFunc

BodyDump prints out the request body for debugging purpose

func CORS

func CORS(cfg *Config) echo.MiddlewareFunc

CORS adds Cross-Origin Resource Sharing support

func DisableCache

func DisableCache() echo.MiddlewareFunc

DisableCache sets the Cache-Control directive to no-store.

func Headers

func Headers() echo.MiddlewareFunc

Headers adds general security headers for basic security measures

func SimpleCORS

func SimpleCORS(allowOrigins []string) echo.MiddlewareFunc

SimpleCORS returns a CORS middleware with minimum configurations. Preflighted request is not allowed though.

Types

type Config

type Config struct {
	AllowOrigins []string
}

Config represents secure specific config

Jump to

Keyboard shortcuts

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