Skip to content

Commit

Permalink
Pickup provider name from go 1.22 mux
Browse files Browse the repository at this point in the history
  • Loading branch information
pinpox committed Apr 24, 2024
1 parent f4685f5 commit 1edd2e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gothic/gothic.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ var GetProviderName = getProviderName

func getProviderName(req *http.Request) (string, error) {

if p:= req.PathValue("provider"); p != "" {
return p, nil
}

// try to get it from the url param "provider"
if p := req.URL.Query().Get("provider"); p != "" {
return p, nil
Expand Down

0 comments on commit 1edd2e4

Please sign in to comment.