Skip to content

Wake Render backend without blocking frontend - #14

Merged
xrpbanks merged 2 commits into
mainfrom
fix-render-direct-backend-wakeup
Aug 29, 2026
Merged

Wake Render backend without blocking frontend#14
xrpbanks merged 2 commits into
mainfrom
fix-render-direct-backend-wakeup

Conversation

@xrpbanks

@xrpbanks xrpbanks commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wake the sleeping Render backend directly from the browser using its public health-only origin.
  • Avoid routing the long health wake-up request through the frontend proxy, which caused frontend 429 responses.
  • Keep every authenticated and session-bearing request on the existing same-origin frontend proxy.
  • Explicitly omit browser credentials from public health probes while retaining credentials by default for normal backend requests.

Verification

  • Frontend lint passed.
  • Frontend production build passed.
  • Direct backend health CORS was verified for the frontend origin.
  • Exact scope: README.md, frontend/.env.example, frontend/components/XamanLoginPanel.tsx, and frontend/lib/backendRequest.ts.
  • No backend, WordPress, or release-check.ps1 changes.

Please do not merge until all checks are green.

Copilot AI lite review requested due to automatic review settings August 29, 2026 04:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the Xaman login startup flow so the frontend can “wake” a sleeping Render backend by calling the backend’s public /health endpoint directly from the browser, instead of routing the long warm-up request through the frontend’s same-origin /api/backend proxy (which previously led to frontend 429s). Authenticated/session-bearing requests are intended to remain on the existing proxy.

Changes:

  • Documented the new “health-only” browser-visible backend origin and clarified the warm-up/proxy behavior (README.md).
  • Added NEXT_PUBLIC_BACKEND_HEALTH_URL as an optional configuration in the frontend env example (frontend/.env.example).
  • Updated the Xaman login panel to select a health-base URL (env-configured or Render-specific fallback) for the backend warm-up probe (frontend/components/XamanLoginPanel.tsx).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Documents the health-only wake-up approach and why it avoids frontend proxy 429s.
frontend/.env.example Adds NEXT_PUBLIC_BACKEND_HEALTH_URL configuration for direct browser health probing.
frontend/components/XamanLoginPanel.tsx Routes the backend warm-up probe through a configurable/cross-origin health base URL instead of always using the proxy.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread frontend/components/XamanLoginPanel.tsx
@xrpbanks
xrpbanks merged commit dcb727c into main Aug 29, 2026
4 checks passed
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