bito-code-review[bot] commented on code in PR #43600:
URL: https://github.com/apache/superset/pull/43600#discussion_r3873658332


##########
docs/docs/using-superset/embedding.mdx:
##########
@@ -88,6 +88,19 @@ embedDashboard({
 
 If the callback returns `null` or is not provided, Superset uses its own 
permalink URL as a fallback.
 
+### Permalink origin rewriting
+
+Separately from `resolvePermalinkUrl`, Superset itself rewrites the origin of 
any permalink URL it generates to `window.location.origin` before showing it to 
the user. This keeps a proxied or subdirectory-deployed Superset from handing 
out a permalink that points at an internal hostname the user's browser can't 
reach.

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Doc misrepresents rewrite scope</b></div>
   <div id="fix">
   
   The wording "Separately from `resolvePermalinkUrl`, Superset itself rewrites 
the origin…" is misleading. In `superset-frontend/src/utils/urlUtils.ts` 
(`resolvePermalinkUrl`, lines 213-245), `rewritePermalinkOrigin` is the 
fallback inside that same function and is only invoked on the non-embedded 
branch (line 244); the embedded branch returns the backend URL untouched (line 
241). Reword to make clear the rewrite is the non-embedded fallback and that 
`EMBEDDED_DISABLE_PERMALINK_ORIGIN_REWRITE` only affects that path.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #e1a36c</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to