Skip to content

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

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-mgt-dev-playground
Draft

Fix mgt.dev playground CSP blocking mock data proxy#3494
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-mgt-dev-playground

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants