Skip to content

Commit ed093e9

Browse files
committed
Provides new query param feature of redirects file
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)
1 parent cfad09d commit ed093e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gateway/handler_unixfs__redirects.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (i *handler) handleRedirectsFileRules(w http.ResponseWriter, r *http.Reques
9999

100100
for _, rule := range redirectRules {
101101
// Error right away if the rule is invalid
102-
if !rule.MatchAndExpandPlaceholders(urlPath) {
102+
if !rule.MatchAndExpandPlaceholders(urlPath, r.URL.Query()) {
103103
continue
104104
}
105105

0 commit comments

Comments
 (0)