Documentation ¶
Index ¶
Constants ¶
View Source
const ( Default = "default" AUTH_USER_ID = "X-Auth-User-Id" )
View Source
const ( ContentTypeName = "Content-Type" ContentTypeApplicationJSON = "application/json;charset=utf-8" ContentTypeTextPlain = "text/plain;charset=utf-8" ContentTypeUrlencoded = "application/x-www-form-urlencoded;charset=utf-8" )
View Source
const ( HeaderRequestId = "X-Request-Id" HeaderRemoteHeader = "X-Remote-Addr" HeaderSourceIp = "X-Src-Ip" HeaderSourceName = "X-Src-Name" )
Variables ¶
View Source
var (
DefaultHeaders = []HeaderGetter{HeaderXForwardedFor, HeaderReferer}
)
Functions ¶
This section is empty.
Types ¶
type HeaderGetter ¶ added in v0.7.0
type StrHeaderGetter ¶ added in v0.7.0
type StrHeaderGetter string
const ( HeaderXForwardedFor StrHeaderGetter = "X-Forwarded-For" HeaderAuthorization StrHeaderGetter = "Authorization" HeaderReferer StrHeaderGetter = "Referer" )
func (StrHeaderGetter) Get ¶ added in v0.7.0
func (s StrHeaderGetter) Get(headers Header) string
func (StrHeaderGetter) Key ¶ added in v0.7.0
func (s StrHeaderGetter) Key() string
Click to show internal directories.
Click to hide internal directories.