Skip to content

fix(pilot): Serve site embeds from the site origin - #723

Merged
tanmoysrt merged 1 commit into
developfrom
fix/site-origin-embeds
Oct 29, 2026
Merged

tanmoysrt merged 1 commit into
developfrom
fix/site-origin-embeds

Conversation

@tanmoysrt

Copy link
Copy Markdown
Member

Issue

An HTTPS site can receive an HTTP admin URL for Cloud Settings and fail to load its JavaScript as mixed content. Admin domain changes also make cached embed URLs stale.

Summary

Serve Cloud Settings frontend assets from the site's own /_pilot/embed/cloud-settings/ path. Keep API calls through Frappe and the existing loopback Pilot endpoint.

Why

A relative embed URL follows the site's scheme and hostname without depending on the admin domain.

What changed

  • Production provisioning and setup use cloud_settings_embed_url = "/_pilot"; admin renames preserve it while updating dashboard links.
  • Nginx serves the assets on site domains and serving aliases, revalidating entry files and caching hashed chunks immutably. Existing public embed routes and development URLs remain available.
  • An upgrade patch publishes nginx routes before migrating existing configurations and clearing site caches. Failed migrations remain retryable.

Verified with 3,997 passing tests (1 skipped), nginx serving tests, 8 SDK tests, Ruff, and mypy. Deployed to the supplied validation host: Frappe emits relative bundle URLs, nginx serves entries and chunks with the expected cache headers, missing assets return 404, and the site ping succeeds. Public HTTPS browser validation is pending the site's URL.

@tanmoysrt
tanmoysrt merged commit 34613ea into develop Oct 29, 2026
6 checks passed
@tanmoysrt
tanmoysrt deleted the fix/site-origin-embeds branch October 29, 2026 14:49
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.

1 participant