path_rewrite_middleware

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbOn map[string]bool = make(map[string]bool)

Functions

func HexEscapeNonASCII

func HexEscapeNonASCII(s string) string

HexEscapeNonASCII - taken directly from the Go source - encodes a string for use in a Location: header.

func PathRewriteMiddleware

func PathRewriteMiddleware(cfg *PathRewriteType, base string, dbF map[string]bool, lgr *zap.Logger, xmd *metrics.MetricsData) func(c *gin.Context)

Types

type PathFromToType

type PathFromToType struct {
	From     []string
	To       string
	Client   int    // non 0 causes a client side re-direct, 302, 307 for example
	Location string //
}

type PathRewriteType

type PathRewriteType struct {
	PathRewrite []PathFromToType `json:"path_rewrite"`
}

Jump to

Keyboard shortcuts

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