scheme

package
v0.0.0-...-84d4900 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeProto

func ChangeProto(rt RedirType, root, port string, handler http.HandlerFunc) http.HandlerFunc

ChangeProto modify the url scheme.

func Redirect

func Redirect(rt RedirType, root, port string, handler http.HandlerFunc) http.HandlerFunc

Redirect change the scheme and redirect the request. If the scheme do not change call the next handler.

Types

type RedirType

type RedirType uint8
const (
	ToHttps RedirType = iota
	ToHttp
	DontCare
)

Jump to

Keyboard shortcuts

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