Skip to content

[star-rating] Load feedback widget assets via document-relative paths#7747

Open
coskunaydinoglu wants to merge 1 commit into
masterfrom
fix/feedback-widget-relative-asset-paths
Open

[star-rating] Load feedback widget assets via document-relative paths#7747
coskunaydinoglu wants to merge 1 commit into
masterfrom
fix/feedback-widget-relative-asset-paths

Conversation

@coskunaydinoglu

Copy link
Copy Markdown
Contributor

The feedback rating popup is rendered into an iframe by the web SDK and is commonly served behind a reverse proxy mounted on an arbitrary, app-specific sub-folder (e.g. /hr/analytics/). The Countly server has no knowledge of that sub-folder, so emitting asset URLs from the global countlyConfig.path (empty on a root install) produced /star-rating/..., /javascripts/... etc. which resolve against the app origin and 404 behind the proxy.

Emit document-relative paths instead, computed per route so they resolve under whatever sub-folder the widget was loaded from:
/feedback/rating (two segments) -> ../
/feedback (legacy, one segment) -> ''

This also keeps working for plain root installs and installs with a configured countlyConfig.path. Runtime API/logo URLs are unchanged (they already build on the SDK-provided server url).

https://claude.ai/code/session_0191WRvHa7axoNxMLPu7xQhk

The feedback rating popup is rendered into an iframe by the web SDK and is
commonly served behind a reverse proxy mounted on an arbitrary, app-specific
sub-folder (e.g. /hr/analytics/). The Countly server has no knowledge of that
sub-folder, so emitting asset URLs from the global countlyConfig.path (empty on
a root install) produced /star-rating/..., /javascripts/... etc. which resolve
against the app origin and 404 behind the proxy.

Emit document-relative paths instead, computed per route so they resolve under
whatever sub-folder the widget was loaded from:
  /feedback/rating (two segments) -> ../
  /feedback        (legacy, one segment) -> ''

This also keeps working for plain root installs and installs with a configured
countlyConfig.path. Runtime API/logo URLs are unchanged (they already build on
the SDK-provided server url).

https://claude.ai/code/session_0191WRvHa7axoNxMLPu7xQhk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants