common

package
v0.0.0-...-4ad3a35 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RelativePathToProjectRoot = "../../"
	HtmlSuffix                = ".html"
	CssSuffix                 = ".css"
	JsSuffix                  = ".js"
	JsonSuffix                = ".json"
	VendorsPath               = "/vendors"
	DataPathPrefix            = "/data"
	StaticDirName             = "static"
	LoginUriPath              = "/api/v1/auth/login"
	LoginHtmlPage             = "/login.html"
	NoAuthorizationMsg        = "no authorization."
	AjaxRequestIdentifier     = "XMLHttpRequest"
	AjaxRequestHeader         = "X-Requested-With"
)
View Source
const (
	OriginHostReqHeader    = "X-Origin-Host"
	ForwardedHostReqHeader = "X-Forwarded-Host"
)

Variables

View Source
var DynamicalProxyCache = make(map[string]string, 10)

target ProxyCache {token:targetIP}

View Source
var TokenCache = make(map[string]domain.User, 20)

{Token:User}

Functions

func AuthFilter

func AuthFilter(h http.Handler) http.Handler

func GeneralFilter

func GeneralFilter(h http.Handler) http.Handler

func GetMd5String

func GetMd5String(s string) string

func ProxyHandler

func ProxyHandler(w http.ResponseWriter, r *http.Request, path string, prefix string, token string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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