Skip to content

Conversation

@aharvard
Copy link
Collaborator

@aharvard aharvard commented Dec 1, 2025

Summary

This PR fixes an issue in the MCP-UI proxy HTML document where image sources were unable to load.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

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)
image

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

Copilot AI review requested due to automatic review settings December 1, 2025 17:26
@aharvard aharvard changed the title add CSP for images [MCP-UI] add CSP for images to proxy HTML Dec 1, 2025
Copy link
Contributor

Copilot AI left a 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

@aharvard aharvard merged commit 525b304 into main Dec 1, 2025
22 checks passed
@aharvard aharvard deleted the fix/mcp-ui-proxy-image-csp branch December 1, 2025 17:45
tlongwell-block added a commit that referenced this pull request Dec 1, 2025
* 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)
zanesq added a commit that referenced this pull request Dec 1, 2025
* '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)
katzdave added a commit that referenced this pull request Dec 1, 2025
…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)
zanesq added a commit that referenced this pull request Dec 2, 2025
…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
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.

3 participants