fix: route signed-out sandbox proxy to graphexplorer.microsoft.com#3495
Open
gavinbarron wants to merge 1 commit into
Open
fix: route signed-out sandbox proxy to graphexplorer.microsoft.com#3495gavinbarron wants to merge 1 commit into
gavinbarron wants to merge 1 commit into
Conversation
Update the signed-out Storybook sandbox proxy to use https://graphexplorer.microsoft.com/api/proxy. MockMiddleware now returns this URL directly, removing the graph.office.net endpoint discovery, fallback, and sessionStorage caching. CSP connect-src allowlists for the main site and the code-editor playground iframe are updated to allow the new host and drop the old office.net hosts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Thank you for creating a Pull Request @@gavinbarron. This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:
|
|
📖 The updated storybook is available here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the sandbox proxy used to fetch Graph data on the Storybook site when users are not signed in, switching from
graph.office.nettohttps://graphexplorer.microsoft.com/api/proxy.Changes
packages/mgt-element/src/mock/MockMiddleware.ts:getBaseUrl()now returnshttps://graphexplorer.microsoft.com/api/proxy?url=directly. Removed thecdn.graph.office.netendpoint-discoveryfetch, thegraph.office.netfallback, and thesessionStoragecaching (which could otherwise serve a stale host to returning users). Request rewriting (?url=+encodeURIComponent) is unchanged.connect-srcallowlists updated to addhttps://graphexplorer.microsoft.comand removehttps://cdn.graph.office.net/https://graph.office.net:.storybook/post-process-index-file.js(main site).storybook/addons/codeEditorAddon/codeAddon.js(code-editor playground iframe)Notes
MockGraph.create()derivescustomHostsfromgetBaseUrl(), so it picks up the new host automatically — no change needed there.Validation
tsc --noEmitonmgt-elementpasses.https://graphexplorer.microsoft.com/api/proxy?url=...without CSP violations.