mirror of
https://github.com/Such-Software/xmrcheckout.git
synced 2026-12-01 12:14:11 +01:00
fix(nginx): refuse the admin API at the public edge
nginx proxied all of /api/ to the internet, including /api/admin, which returns every merchant's API key and webhook secret behind a single shared key. The only caller is the admin panel's server actions, so nginx now answers /api/admin with a 404 and those actions reach the API directly over the compose network through ADMIN_API_BASE_URL (default http://api:8000), falling back to API_BASE_URL for non-Docker installs.
This commit is contained in:
@@ -193,6 +193,7 @@ services:
|
||||
NEXT_PUBLIC_SITE_NAME: ${SITE_NAME:-XMR Checkout}
|
||||
environment:
|
||||
API_BASE_URL: ${API_BASE_URL:-http://nginx}
|
||||
ADMIN_API_BASE_URL: ${ADMIN_API_BASE_URL:-http://api:8000}
|
||||
NEXT_PUBLIC_SITE_URL: ${SITE_URL:-http://localhost}
|
||||
NEXT_PUBLIC_DONATIONS_ENABLED: ${DONATIONS_ENABLED:-false}
|
||||
NEXT_PUBLIC_TURNSTILE_SITE_KEY: ${TURNSTILE_SITE_KEY:-}
|
||||
|
||||
Reference in New Issue
Block a user