Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rulesets: allow PreserveQueryString to be nullable #1275

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/1275.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
rulesets: allow `PreserveQueryString` to be nullable
```
2 changes: 1 addition & 1 deletion rulesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ type RulesetRuleActionParametersAutoMinify struct {
type RulesetRuleActionParametersFromValue struct {
StatusCode uint16 `json:"status_code,omitempty"`
TargetURL RulesetRuleActionParametersTargetURL `json:"target_url"`
PreserveQueryString bool `json:"preserve_query_string,omitempty"`
PreserveQueryString *bool `json:"preserve_query_string,omitempty"`
}

type RulesetRuleActionParametersTargetURL struct {
Expand Down
2 changes: 1 addition & 1 deletion rulesets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ func TestGetRuleset_RedirectFromValue(t *testing.T) {
TargetURL: RulesetRuleActionParametersTargetURL{
Value: "some_host.com",
},
PreserveQueryString: true,
PreserveQueryString: BoolPtr(true),
},
},
Description: "Set dynamic redirect from value",
Expand Down