Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
5b380a294b | |||
ddb4b35181 |
@@ -268,7 +268,7 @@ func (csp *CSP) value() string {
|
||||
|
||||
sb.WriteString(fmt.Sprintf(
|
||||
"style-src %s; ",
|
||||
cspNormalised(csp.StyleSrc, []string{"self", "https:", "unsafe-inline"}),
|
||||
cspNormalised(csp.StyleSrc, []string{"self", "unsafe-inline"}),
|
||||
))
|
||||
|
||||
sb.WriteString(fmt.Sprintf(
|
||||
@@ -288,7 +288,7 @@ func (csp *CSP) value() string {
|
||||
|
||||
sb.WriteString(fmt.Sprintf(
|
||||
"font-src %s; ",
|
||||
cspNormalised(csp.FontSrc, []string{"self", "https:", "data:"}),
|
||||
cspNormalised(csp.FontSrc, []string{"self", "data:"}),
|
||||
))
|
||||
|
||||
sb.WriteString(fmt.Sprintf(
|
||||
|
@@ -20,6 +20,11 @@ func NewRouter() *Router {
|
||||
return r
|
||||
}
|
||||
|
||||
// DO NOT USE it for routing, exposed only for edge cases.
|
||||
func (r *Router) ServeMux() *http.ServeMux {
|
||||
return r.mux
|
||||
}
|
||||
|
||||
// Use will register middleware(s) with router stack
|
||||
func (r *Router) Use(h ...func(http.Handler) http.Handler) {
|
||||
if r == nil {
|
||||
|
Reference in New Issue
Block a user