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
+5 -1
View File
@@ -55,10 +55,12 @@ Metrics
Provides :ref:`metrics`.
.. _runtime_config:
Runtime Configuration
=====================
Provides a ``config`` endpoint that returns the runtime :ref:`configuration`.
Provides a ``config`` endpoint that returns the runtime :ref:`configuration`. This requires setting :ref:`admin-server-config-enabled`.
.. code-block:: bash
@@ -72,6 +74,8 @@ Provides a ``config`` endpoint that returns the runtime :ref:`configuration`.
db-channel-enabled = false
...
.. _runtime_schema_cache:
Runtime Schema Cache
====================
+24
View File
@@ -161,6 +161,30 @@ admin-server-port
Specifies the port for the :ref:`admin_server`.
.. _admin-server-config-enabled:
admin-server-config-enabled
---------------------------
.. danger::
The ``/config`` endpoint contains sensitive information, don't enable this if you're exposing the Admin Server publicly.
To safely enable this you can use a proxy like :ref:`nginx` to:
- Ensure ``/config`` are only available to local networks.
- Only expose ``/live`` and ``/ready`` to public networks.
=============== =================================
**Type** Boolean
**Default** False
**Reloadable** N
**Environment** PGRST_ADMIN_SERVER_CONFIG_ENABLED
**In-Database** `n/a`
=============== =================================
Enables the admin server :ref:`runtime_config` and :ref:`runtime_schema_cache` endpoints.
.. _app.settings.*:
app.settings.*