Conversation
Deploying mcp-ui with
|
| Latest commit: |
37b588d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://caee3775.mcp-ui.pages.dev |
| Branch Preview URL: | https://feat-render-blob-instead-src.mcp-ui.pages.dev |
idosal
left a comment
There was a problem hiding this comment.
Awesome! We may want to set a clearer name for the prop. Note that this is technically a breaking change
weizman
left a comment
There was a problem hiding this comment.
Looks good (focused solely on blob logic part)
| }, | ||
| ); | ||
| } | ||
| if (iframeSrcBlobUrl.current && typeof window?.URL?.revokeObjectURL === 'function') { |
There was a problem hiding this comment.
If you managed to create the blob since the create function existed, it necessarily translates to the revoke function existing as well, therefore check might be redundant (nit)
|
Cool idea here. Is there a limit within any given browser to how many characters a blob URL can be for an iframe src? I imagine it's possible for rawHTML to be huge if massive script bundles and large style blocks get inlined. Hopefully, this won't be the norm, but I am curious about the upper bound edge case (if one exists). |
See #76 - exposed raw HTML as
srcDocmight be a security risk when used with other 3rd party scripts on the page.This PR changes the default from a raw HTML
srcDocto a Blob URL src.In embeding environments where CSP block Blob URLs - the
useSrcDocprop can be set to revert this behavior (and usesrcDocas before).