mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 08:29:58 +08:00
fix golint issues in rest (#529)
This commit is contained in:
@@ -12,8 +12,10 @@ import (
|
||||
|
||||
const contentSecurity = "X-Content-Security"
|
||||
|
||||
// UnsignedCallback defines the method of the unsigned callback.
|
||||
type UnsignedCallback func(w http.ResponseWriter, r *http.Request, next http.Handler, strict bool, code int)
|
||||
|
||||
// ContentSecurityHandler returns a middleware to verify content security.
|
||||
func ContentSecurityHandler(decrypters map[string]codec.RsaDecrypter, tolerance time.Duration,
|
||||
strict bool, callbacks ...UnsignedCallback) func(http.Handler) http.Handler {
|
||||
if len(callbacks) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user