Skip to content

Fix mgt.dev playground CSP blocking mock data proxy#3494

Merged
gavinbarron merged 2 commits into
mainfrom
copilot/fix-mgt-dev-playground
Jul 6, 2026
Merged

Fix mgt.dev playground CSP blocking mock data proxy#3494
gavinbarron merged 2 commits into
mainfrom
copilot/fix-mgt-dev-playground

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The mgt.dev playground stopped rendering components, failing with Refused to connect because it violates the document's Content Security Policy on requests to https://graph.office.net/....

The mock data middleware resolves its proxy endpoint from https://cdn.graph.office.net/en-us/graph/api/proxy/endpoint, which returns a base URL on https://graph.office.net (also the hardcoded fallback in MockMiddleware.ts). Only cdn.graph.office.net was whitelisted in the CSP connect-src, so all subsequent data requests were blocked.

Changes

  • Add https://graph.office.net to the connect-src CSP directive in .storybook/addons/codeEditorAddon/codeAddon.js (live preview iframe).
  • Add https://graph.office.net to the connect-src CSP directive in .storybook/post-process-index-file.js (built index page).

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for creating a Pull Request @@Copilot.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

Copilot AI changed the title [WIP] Fix playground issue on mgt.dev Fix mgt.dev playground CSP blocking mock data proxy Jun 26, 2026
Copilot AI requested a review from sebastienlevert June 26, 2026 17:13
@github-project-automation github-project-automation Bot moved this to Done ✔️ in Graph Toolkit Jul 6, 2026
@gavinbarron gavinbarron marked this pull request as ready for review July 6, 2026 20:43
@gavinbarron gavinbarron requested a review from a team as a code owner July 6, 2026 20:43
@gavinbarron gavinbarron merged commit 6274ec3 into main Jul 6, 2026
9 of 10 checks passed
@gavinbarron gavinbarron deleted the copilot/fix-mgt-dev-playground branch July 6, 2026 20:49
@github-project-automation github-project-automation Bot moved this from Done ✔️ to Shipped 🚀 in Graph Toolkit Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Shipped 🚀

Development

Successfully merging this pull request may close these issues.

3 participants