mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Add wrapper for github.com/gorilla/mux to resolve multi-repo context key issues
This commit is contained in:
parent
6f5a67fde2
commit
13e64209a6
1 changed files with 5 additions and 0 deletions
|
@ -39,3 +39,8 @@ func Serve() {
|
|||
log.Infof("api: starting to listen on %s", address)
|
||||
log.Errorf("api: failed to listen on %s: %s", address, http.ListenAndServe(address, mainMux))
|
||||
}
|
||||
|
||||
// GetMuxVars wraps github.com/gorilla/mux.Vars in order to mitigate context key issues in multi-repo projects.
|
||||
func GetMuxVars(r *http.Request) map[string]string {
|
||||
return mux.Vars(r)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue