Skip to content

Use guard hostname for realtime and config polling - #346

Open
hansott wants to merge 1 commit into
mainfrom
realtime
Open

Use guard hostname for realtime and config polling#346
hansott wants to merge 1 commit into
mainfrom
realtime

Conversation

@hansott

@hansott hansott commented Aug 17, 2026

Copy link
Copy Markdown
Member

No description provided.


// Default option :
return "https://runtime.aikido.dev/";
return getAikidoAPIEndpoint(token);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium - Realtime polling now reuses AIKIDO_ENDPOINT even though it calls a different path contract

This fallback now returns AIKIDO_ENDPOINT, but RealtimeAPI still probes <base>/config while the normal API client uses <base>/api/runtime/.... In deployments that override only AIKIDO_ENDPOINT to point at an API proxy or mock server and omit AIKIDO_REALTIME_ENDPOINT, the poller will now hit 404s on the custom API base instead of the default realtime host. That leaves config and blocked-list refreshes stuck on stale data until a separate realtime endpoint is configured.

Show fix
Suggested change
return getAikidoAPIEndpoint(token);
String region = token != null ? token.getRegion() : "EU";
return switch (region) {
case "US" -> "https://guard.us.aikido.dev/";
case "ME" -> "https://guard.me.aikido.dev/";
case "AU" -> "https://guard.au.aikido.dev/";
default -> "https://guard.aikido.dev/";
};

More info - Reply on this comment to give feedback or ignore the issue.

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants