-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[MCP-UI] add CSP for images to proxy HTML #5931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 fixes an image loading issue in the MCP-UI proxy by adding the img-src directive to the Content Security Policy (CSP). Without this directive, the CSP was falling back to the restrictive default-src 'self' policy, which prevented images from external origins from loading.
Key Changes
- Added
img-src *directive to the CSP meta tag to allow images from any origin - Updated the comment documentation to include the new img-src directive
* origin/main: Feat/automatic update installation (#5345) fix: Added "Merged consecutive assistant messages" to the acceptable issues for moim injection check (#5933) fix: anthropic provider model fetching (#5932) [MCP-UI] add CSP for images to proxy HTML (#5931) fix: correct typo in blog post (AIMDOEL -> AIMODEL) (#5902) feat: @goose in terminal (native terminal support) (#5887) docs: adding AI-friendly features (#5918) Blog/advent of ai announcement (#5917) Extension selector behind ALPHA flag (#5892)
* 'main' of github.com:block/goose: Feat: Added custom headers and toggle keyring CLI options (#5017) Feat/automatic update installation (#5345) fix: Added "Merged consecutive assistant messages" to the acceptable issues for moim injection check (#5933) fix: anthropic provider model fetching (#5932) [MCP-UI] add CSP for images to proxy HTML (#5931)
…nses-streaming * 'main' of github.com:block/goose: Feat/automatic update installation (#5345) fix: Added "Merged consecutive assistant messages" to the acceptable issues for moim injection check (#5933) fix: anthropic provider model fetching (#5932) [MCP-UI] add CSP for images to proxy HTML (#5931) fix: correct typo in blog post (AIMDOEL -> AIMODEL) (#5902) feat: @goose in terminal (native terminal support) (#5887) docs: adding AI-friendly features (#5918) Blog/advent of ai announcement (#5917) Extension selector behind ALPHA flag (#5892) blog: typo fixes (#5896) blog: fixing img url (#5895) blog: MCPs for Developers (#5884) docs: Extension Manager MCP (#5883) Update cleanup marker logic for Fedora users. (#5868) Improve AWS credential loading and configuration handling in BedrockProvider (#5699)
…0-5147 * 'main' of github.com:block/goose: (243 commits) chore: upgrade npm packages (#5951) feat: ActionRequired (#5897) feat(acp): support loading sessions in acp (#5942) docs: add videos to multi-model page (#5938) docs: promote planning guide (#5934) fix: use a lock to ensure only need to run tunnel just in case multiple go… (#5885) Feat: Added custom headers and toggle keyring CLI options (#5017) Feat/automatic update installation (#5345) fix: Added "Merged consecutive assistant messages" to the acceptable issues for moim injection check (#5933) fix: anthropic provider model fetching (#5932) [MCP-UI] add CSP for images to proxy HTML (#5931) fix: correct typo in blog post (AIMDOEL -> AIMODEL) (#5902) feat: @goose in terminal (native terminal support) (#5887) docs: adding AI-friendly features (#5918) Blog/advent of ai announcement (#5917) Extension selector behind ALPHA flag (#5892) blog: typo fixes (#5896) blog: fixing img url (#5895) blog: MCPs for Developers (#5884) docs: Extension Manager MCP (#5883) ... # Conflicts: # crates/goose-server/src/routes/config_management.rs # crates/goose/src/providers/mod.rs # ui/desktop/openapi.json # ui/desktop/src/api/sdk.gen.ts # ui/desktop/src/api/types.gen.ts # ui/desktop/src/components/ProgressiveMessageList.tsx
Summary
This PR fixes an issue in the MCP-UI proxy HTML document where image sources were unable to load.
Type of Change
Testing
Manual
Related Issues
Relates to #ISSUE_ID
Discussion: LINK (if any)
Screenshots/Demos (for UX changes)
Before: image of cheeseburger does not load (fork and knife icon expected for restaurants with no image)

After: image of cheeseburger does load (fork and knife icon expected for restaurants with no image)
