Skip to content

Commit

Permalink
Provides new query param feature of redirects file
Browse files Browse the repository at this point in the history
Draft commit for using ipfs/go-ipfs-redirects-file#21 to allow query parameters in redirects.

Cannot be completed/will not be ready until that PR is merged, and a new version released (so go.mod/go.sum can be updated here)
  • Loading branch information
jphastings committed Jul 9, 2023
1 parent cfad09d commit ed093e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gateway/handler_unixfs__redirects.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (i *handler) handleRedirectsFileRules(w http.ResponseWriter, r *http.Reques

for _, rule := range redirectRules {
// Error right away if the rule is invalid
if !rule.MatchAndExpandPlaceholders(urlPath) {
if !rule.MatchAndExpandPlaceholders(urlPath, r.URL.Query()) {
continue
}

Expand Down

0 comments on commit ed093e9

Please sign in to comment.