Skip to content

fix(feedback): point widget at same-origin feedback path - #249

Merged
paulyhedral merged 1 commit into
developfrom
fix/feedback-widget-api-url
Oct 7, 2026
Merged

paulyhedral merged 1 commit into
developfrom
fix/feedback-widget-api-url

Conversation

@paulyhedral

Copy link
Copy Markdown
Contributor

Summary

  • Embed shared-web feedback widget in nav #247 set the feedback widget's data-api-url to https://api.admin.dev.sweetrpg.com/api/0/feedback - a host that doesn't exist on this platform
  • admin-api is exposed under the same dev.sweetrpg.com host as main-web, at /api/0/admin/<route> (see docs/deployment-conventions.md's "API Ingress path versioning"), so this call is same-origin, not cross-origin
  • Fix FEEDBACK_API_URL's default to the correct path-only value: /api/0/admin/feedback

Confirmed against the live dev endpoint:

  • https://api.admin.dev.sweetrpg.com/... -> 404 (host doesn't route anywhere meaningful)
  • https://dev.sweetrpg.com/api/0/admin/feedback -> 200 {"status":"accepted"}

(The ALLOWED_ORIGINS CORS config added to admin-api in sweetrpg/admin-api#95 turns out to be unnecessary - same-origin requests don't need CORS - but it's harmless to leave in place.)

Test plan

  • cargo fmt --check, cargo clippy --all-targets, cargo test pass
  • Manual dev-environment check: submit via the widget, confirm 200 and a real GitHub issue lands on sweetrpg/platform

@paulyhedral paulyhedral added the bug Something isn't working label Oct 7, 2026
@paulyhedral paulyhedral self-assigned this Oct 7, 2026
@paulyhedral
paulyhedral enabled auto-merge October 7, 2026 17:23
@paulyhedral
paulyhedral merged commit 963efc8 into develop Oct 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant