Fix issue #74: Foundry's icons are not available: its bridge is not set up, or it cannot be reached right now.
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 19:24:18 +00:00
parent 6df7d57376
commit 06144e1623
3 changed files with 82 additions and 2 deletions

View File

@@ -1,5 +1,11 @@
async function requestFoundry(path) {
const baseUrl = process.env.FOUNDRY_API_URL;
// The bridge a campaign's icon and world reads go to is the very one that
// world already pushes its snapshot to. It is often configured under
// FOUNDRY_API_CLIENT_URL alone — the address the Foundry client reaches —
// while FOUNDRY_API_URL is the optional private one the backend prefers.
// Falling back to it keeps a connected, syncing world's reads working
// instead of reporting its bridge as unset (Syndria98/dragonroll#74).
const baseUrl = process.env.FOUNDRY_API_URL || process.env.FOUNDRY_API_CLIENT_URL;
const token = process.env.FOUNDRY_API_TOKEN;
if (!baseUrl || !token) {