fix: don't enable admin server /config by default

This now requires setting `admin-server-config-enabled`.
This commit is contained in:
steve-chavez
2025-05-01 20:24:08 -05:00
committed by Steve Chavez
parent 36eb72c2a0
commit 1f28efa9bd
18 changed files with 65 additions and 3 deletions
+9
View File
@@ -673,6 +673,15 @@ def test_admin_config(defaultenv):
"Should get a success response from the admin server containing current configuration"
with run(env=defaultenv) as postgrest:
response = postgrest.admin.get("/config")
assert response.status_code == 404
env = {
**defaultenv,
"PGRST_ADMIN_SERVER_CONFIG_ENABLED": "true",
}
with run(env=env) as postgrest:
response = postgrest.admin.get("/config")
print(response.text)
assert response.status_code == 200