Skip to content

Commit

Permalink
Fix page rule polish (off, lossless or lossy) (#116)
Browse files Browse the repository at this point in the history
* allow polish to be "off","lossless" or "lossy"
  • Loading branch information
SteveGoldthorpe-Work authored and patryk committed Sep 18, 2018
1 parent 68e829a commit d6fd35e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cloudflare/resource_cloudflare_page_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ func resourceCloudflarePageRule() *schema.Resource {
ValidateFunc: validation.StringInSlice([]string{"on", "off"}, false),
},

"polish": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"on", "off"}, false),
},

"explicit_cache_control": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -255,6 +249,12 @@ func resourceCloudflarePageRule() *schema.Resource {
Optional: true,
},

"polish": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"off", "lossless", "lossy"}, false),
},

"resolve_override": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -499,7 +499,6 @@ var pageRuleAPIOnOffFields = []string{
"mirage",
"opportunistic_encryption",
"origin_error_page_pass_thru",
"polish",
"respect_strong_etag",
"response_buffering",
"rocket_loader",
Expand All @@ -525,6 +524,7 @@ var pageRuleAPIStringFields = []string{
"cache_level",
"cache_on_cookie",
"host_header_override",
"polish",
"resolve_override",
"security_level",
"ssl",
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/page_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Action blocks support the following:
* `ip_geolocation` - (Optional) Whether this action is `"on"` or `"off"`.
* `mirage` - (Optional) Whether this action is `"on"` or `"off"`.
* `opportunistic_encryption` - (Optional) Whether this action is `"on"` or `"off"`.
* `polish` - (Optional) Whether this action is `"off"`, `"lossless"` or `"lossy"`.
* `resolve_override` - (Optional) Overridden origin server name.
* `rocket_loader` - (Optional) Whether to set the rocket loader to `"on"`, `"off"`.
* `security_level` - (Optional) Whether to set the security level to `"off"`, `"essentially_off"`, `"low"`, `"medium"`, `"high"`, or `"under_attack"`.
Expand Down

0 comments on commit d6fd35e

Please sign in to comment.