Blame view
middleware/main.go
626 Bytes
776b4c95b refactored middle... |
1 2 3 4 |
package middleware import ( "net/http" |
776b4c95b refactored middle... |
5 6 7 |
) func Headers(h http.HandlerFunc) http.HandlerFunc { |
65d214f47 improved middlewa... |
8 |
return SetAccessControlHeaders(IgnoreOptionsRequests(ParseForm(h))) |
776b4c95b refactored middle... |
9 |
} |
65d214f47 improved middlewa... |
10 11 |
func AuthUser(roles string, h http.HandlerFunc) http.HandlerFunc { return SetAccessControlHeaders(IgnoreOptionsRequests(ParseForm(Auth(roles, h)))) |
776b4c95b refactored middle... |
12 |
} |
65d214f47 improved middlewa... |
13 14 |
func AuthUserLogTraffic(roles string, h http.HandlerFunc) http.HandlerFunc { return SetAccessControlHeaders(IgnoreOptionsRequests(ParseForm(LogHTTP(Auth(roles, h))))) |
776b4c95b refactored middle... |
15 |
} |
b3f1275cd refactored middle... |
16 |
func LogTraffic(h http.HandlerFunc) http.HandlerFunc { |
65d214f47 improved middlewa... |
17 |
return SetAccessControlHeaders(IgnoreOptionsRequests(ParseForm(LogHTTP(h)))) |
776b4c95b refactored middle... |
18 |
} |