fix: preserve PostgREST RPC path through DWH proxy
This commit is contained in:
@@ -486,7 +486,7 @@ probe_body="$temp_root/probe.body"
|
||||
expect_status verifier_not_public 404 "$probe_body" 'http://synthetic/_check_dwh_key'
|
||||
report_pass verifier_not_public
|
||||
|
||||
route_url='http://synthetic/dwh/?keep=exact&second=two'
|
||||
route_url='http://synthetic/dwh/rpc/ping?x=keep&second=two'
|
||||
expect_status valid_v1 200 "$probe_body" \
|
||||
-H "X-API-Key: $v1_key" \
|
||||
-H 'Cookie: synthetic-session=one' \
|
||||
@@ -496,7 +496,7 @@ expect_status valid_v1 200 "$probe_body" \
|
||||
[[ $(<"$probe_body") == 'postgrest-marker' ]] || fail_case valid_v1
|
||||
report_pass valid_v1
|
||||
|
||||
expect_status valid_legacy 200 "$probe_body" -H "X-API-Key: $legacy_key" 'http://synthetic/dwh/?legacy=one'
|
||||
expect_status valid_legacy 200 "$probe_body" -H "X-API-Key: $legacy_key" 'http://synthetic/dwh/rpc/ping?legacy=one'
|
||||
[[ $(<"$probe_body") == 'postgrest-marker' ]] || fail_case valid_legacy
|
||||
report_pass valid_legacy
|
||||
|
||||
@@ -554,12 +554,12 @@ assert len(marker) == 2
|
||||
assert marker[0] == {
|
||||
"has_api_key": False,
|
||||
"has_dwh_key_id": False,
|
||||
"path": "/dwh/?keep=exact&second=two",
|
||||
"path": "/rpc/ping?x=keep&second=two",
|
||||
}
|
||||
assert marker[1] == {
|
||||
"has_api_key": False,
|
||||
"has_dwh_key_id": False,
|
||||
"path": "/dwh/?legacy=one",
|
||||
"path": "/rpc/ping?legacy=one",
|
||||
}
|
||||
PY
|
||||
report_pass header_and_path_isolation
|
||||
|
||||
Reference in New Issue
Block a user