core

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeKey   = "Content-Type"
	JsonContentType  = "application/json"
	RedirectHttpCode = 302
	SessionTokenKey  = "X-Session-Token"

	AjaxRequestIdentifier = "XMLHttpRequest"
	AjaxRequestHeader     = "X-Requested-With"

	HtmlSuffix          = ".html"
	CssSuffix           = ".css"
	JsSuffix            = ".js"
	JsonSuffix          = ".json"
	VendorsPath         = "/vendors"
	DataPathPrefix      = "/data"
	LoginUriPath        = "/api/v1/auth/login"
	UserCreaterUriPath  = "/api/v1/user"
	LoginHtmlPage       = "/login.html"
	UserCreaterHtmlPage = "/usercreater.html"

	NoAuthorizationMsg = "no authorization."
)
View Source
const (
	HttpProtocol           = "http"
	OriginHostReqHeader    = "X-Origin-Host"
	ForwardedHostReqHeader = "X-Forwarded-Host"
)
View Source
const (
	RootURIPath = "/"
)

Variables

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)

Types

This section is empty.

Jump to

Keyboard shortcuts

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