feat: add basic auth for external node

This commit is contained in:
otani
2024-03-07 09:49:38 +02:00
parent 9cebe8b7f4
commit 118523076b
2 changed files with 9 additions and 0 deletions

View File

@ -62,6 +62,11 @@ enable_tls: false
acme_email: ""
domain_name: ""
# Enable basic auth for external node
enable_basic_auth: false
basic_auth_username: ""
basic_auth_secret: ""
# Force restore pg database
force_pg_restore: false

View File

@ -69,6 +69,10 @@ services:
- "traefik.http.routers.external_node_health.rule=PathPrefix(`/`)"
- "traefik.http.routers.external_node_health.entrypoints=external_node_health"
- "traefik.http.routers.external_node_health.service=external_node_health"
{% if enable_basic_auth %}
- "traefik.http.routers.external_node_main.middlewares=external_node_auth"
- "traefik.http.middlewares.external_node_auth.basicauth.users={{ basic_auth_username }}:{{ basic_auth_secret }}"
{% endif %}
expose:
- {{ rpc_http_port }}
- {{ rpc_ws_port }}