path_rewriter

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbOn 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 NewPathRewriteHandler

func NewPathRewriteHandler(handler http.Handler, cfg *PathRewriteType, xcfg *ymux.BaseConfigType, dbF map[string]bool, f *os.File) http.Handler

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 PathRewriteHandler

type PathRewriteHandler struct {
	// contains filtered or unexported fields
}

func (*PathRewriteHandler) ServeHTTP

func (h *PathRewriteHandler) ServeHTTP(www http.ResponseWriter, req *http.Request)

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