From 884e1c4c850a65f637d8ef415c24aec9aebf45fe Mon Sep 17 00:00:00 2001 From: Beng Eu Date: Thu, 12 Sep 2024 00:36:53 +0800 Subject: [PATCH] fix: correct reference to Envoy Lua filters Not sure why the tests at https://github.com/supabase/postgres/blob/ab7f879ba4bfacb4d0568c42f6d14c11826c8a03/testinfra/test_ami_nix.py#L343 didn't catch this, but can investigate that seperately. --- ansible/files/envoy_config/lds.yaml | 9 ++++----- common-nix.vars.pkr.hcl | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ansible/files/envoy_config/lds.yaml b/ansible/files/envoy_config/lds.yaml index 4c4818c55..60a38f65d 100644 --- a/ansible/files/envoy_config/lds.yaml +++ b/ansible/files/envoy_config/lds.yaml @@ -93,8 +93,7 @@ resources: local path = request_handle:headers():get(":path") request_handle :headers() - :replace(":path", path:gsub("&=[^&]*", ""):gsub("?=[^&]*$", ""):gsub("?=[^&]*&", "?")) - :replace(":path", path:gsub("&apikey=[^&]*", ""):gsub("?apikey=[^&]*$", ""):gsub("?apikey=[^&]*&", "?")) + :replace(":path", path:gsub("&=[^&]*", ""):gsub("?=[^&]*$", ""):gsub("?=[^&]*&", "?"):gsub("&apikey=[^&]*", ""):gsub("?apikey=[^&]*$", ""):gsub("?apikey=[^&]*&", "?")) end remove_empty_key_query_parameters: inline_string: |- @@ -103,7 +102,6 @@ resources: request_handle :headers() :replace(":path", path:gsub("&=[^&]*", ""):gsub("?=[^&]*$", ""):gsub("?=[^&]*&", "?")) - end - name: envoy.filters.http.compressor.brotli typed_config: @@ -290,7 +288,7 @@ resources: envoy.filters.http.lua: '@type': >- type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute - name: remove_apikey_and_empty_key_query_parameter + name: remove_apikey_and_empty_key_query_parameters - match: prefix: /rest/v1/ request_headers_to_remove: @@ -303,7 +301,7 @@ resources: envoy.filters.http.lua: '@type': >- type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute - name: remove_empty_key_query_parameter + name: remove_empty_key_query_parameters - match: prefix: /rest-admin/v1/ query_parameters: @@ -414,3 +412,4 @@ resources: filename: /etc/envoy/fullChain.pem private_key: filename: /etc/envoy/privKey.pem + diff --git a/common-nix.vars.pkr.hcl b/common-nix.vars.pkr.hcl index e5af7f254..43c8c386a 100644 --- a/common-nix.vars.pkr.hcl +++ b/common-nix.vars.pkr.hcl @@ -1 +1 @@ -postgres-version = "15.6.1.120" +postgres-version = "15.6.1.121"