lua: fix rewrite response headers to handle dashes in URLs (#3980)

* lua: fix rewrite response headers to handle dashes in URLs

* fix test
This commit is contained in:
Caleb Doxsey 2023-02-16 08:51:53 -07:00 committed by GitHub
parent f2a5bda162
commit 513519e4be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -54,13 +54,13 @@ func TestLuaRewriteHeaders(t *testing.T) {
require.NoError(t, err)
headers := map[string]string{
"Location": "https://localhost:8080/two/some/uri/",
"Location": "https://domain-with-dashes:8080/two/some/uri/",
}
metadata := map[string]interface{}{
"rewrite_response_headers": []interface{}{
map[string]interface{}{
"header": "Location",
"prefix": "https://localhost:8080/two/",
"prefix": "https://domain-with-dashes:8080/two/",
"value": "https://frontend/one/",
},
map[string]interface{}{