diff --git a/internal/web/actions/default/servers/server/settings/gzip/index.go b/internal/web/actions/default/servers/server/settings/gzip/index.go index 936fb6f0..4ceb8c81 100644 --- a/internal/web/actions/default/servers/server/settings/gzip/index.go +++ b/internal/web/actions/default/servers/server/settings/gzip/index.go @@ -66,12 +66,12 @@ func (this *IndexAction) RunGet(params struct { } func (this *IndexAction) RunPost(params struct { - WebId int64 - GzipId int64 - Level int - MinLength string - MaxLength string - CondGroupsJSON []byte + WebId int64 + GzipId int64 + Level int + MinLength string + MaxLength string + CondsJSON []byte Must *actions.Must }) { @@ -99,11 +99,11 @@ func (this *IndexAction) RunPost(params struct { if params.GzipId > 0 { _, err := this.RPC().HTTPGzipRPC().UpdateHTTPGzip(this.AdminContext(), &pb.UpdateHTTPGzipRequest{ - GzipId: params.GzipId, - Level: types.Int32(params.Level), - MinLength: minLength, - MaxLength: maxLength, - CondGroupsJSON: params.CondGroupsJSON, + GzipId: params.GzipId, + Level: types.Int32(params.Level), + MinLength: minLength, + MaxLength: maxLength, + CondsJSON: params.CondsJSON, }) if err != nil { this.ErrorPage(err) @@ -111,10 +111,10 @@ func (this *IndexAction) RunPost(params struct { } } else { resp, err := this.RPC().HTTPGzipRPC().CreateHTTPGzip(this.AdminContext(), &pb.CreateHTTPGzipRequest{ - Level: types.Int32(params.Level), - MinLength: minLength, - MaxLength: maxLength, - CondGroupsJSON: params.CondGroupsJSON, + Level: types.Int32(params.Level), + MinLength: minLength, + MaxLength: maxLength, + CondsJSON: params.CondsJSON, }) if err != nil { this.ErrorPage(err) diff --git a/web/public/js/components/server/http-cond-definitions.js b/web/public/js/components/server/http-cond-definitions.js index f381d35d..b16290d0 100644 --- a/web/public/js/components/server/http-cond-definitions.js +++ b/web/public/js/components/server/http-cond-definitions.js @@ -5,6 +5,7 @@ Vue.component("http-cond-url-extension", { let cond = this.vCond if (cond == null) { cond = { + isRequest: true, param: "${requestPathExtension}", operator: "in", value: "[]" @@ -85,7 +86,7 @@ Vue.component("http-cond-mime-type", { let cond = this.vCond if (cond == null) { cond = { - type: "mime-type", + isRequest: false, param: "${response.contentType}", operator: "mime type", value: "[]" @@ -144,7 +145,7 @@ Vue.component("http-cond-mime-type", {