Documentation
¶
Index ¶
- func APISecret(next http.Handler) http.Handler
- func Auth(next http.Handler) http.Handler
- func Cors() func(next http.Handler) http.Handler
- func GetSession(r *http.Request) *model.Session
- func GetUser(r *http.Request) *model.User
- func Gzip() func(next http.Handler) http.Handler
- func IsAdmin(r *http.Request) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APISecret ¶ added in v0.12.0
APISecret checks the Authorization header against the configured API secret. The schema must be "Key".
func Cors ¶
Cors configures CORS log level and origins. The configuration is not restricted by default.
func GetSession ¶ added in v1.2.1
GetSession returns the session if the request was made by a signed-in user. Otherwise, nil is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.