feat(backend-defaults): warn on localhost or invalid backend.baseUrl in HostDiscovery

Adds startup warnings to HostDiscovery.fromConfig when backend.baseUrl
is set to a localhost address in a production environment, or when the
value is not a valid URL at all.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
This commit is contained in:
Fredrik Adelöw
2026-04-03 14:48:26 +02:00
parent b9fec1bdc8
commit 308c672680
3 changed files with 72 additions and 0 deletions
@@ -0,0 +1,5 @@
---
'@backstage/backend-defaults': patch
---
`HostDiscovery` now logs a warning when `backend.baseUrl` is set to a localhost address while `NODE_ENV` is `production`, and when `backend.baseUrl` is not a valid URL.