Skip to content
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

Add ‘Cross-Origin-Resource-Policy: cross-origin’ to response headers #537

Open
Gnorme opened this issue Jun 11, 2023 · 3 comments
Open
Assignees

Comments

@Gnorme
Copy link

Gnorme commented Jun 11, 2023

✅ Prerequisites

  • [ ✅ ] Did you perform a cursory search of open issues? Is this feature already requested elsewhere?
  • [ ✅ ] Are you reporting to the correct repository (magic-sdk)?

✨ Feature Request

Add ‘Cross-Origin-Resource-Policy: cross-origin’ to the response headers of requests. This would enable Magic SDK to be used on cross-origin isolated pages.

🧩 Context

The ‘Cross-Origin-Resource-Policy' response header is not set to anything for requests made using magic-sdk. I currently can’t use magic.user.getInfo() or similar requests on my page because it needs to be cross-origin isolated to use FFmpeg.wasm.

@am-hernandez
Copy link
Member

Hi @Gnorme ,

Thank you for reporting this feature request. We will follow up with you here when we have an update to share!

Thank you!

@ayv8er
Copy link

ayv8er commented Oct 16, 2023

@Gnorme, please navigate to the settings of your Magic app under the Content Security Policy section, and add the URL in question. This may resolve your issue.
Screenshot 2023-10-16 at 4 01 26 PM

@Gnorme
Copy link
Author

Gnorme commented Nov 9, 2023

@Gnorme, please navigate to the settings of your Magic app under the Content Security Policy section, and add the URL in question. This may resolve your issue.

This did not solve my issue. I'm still getting:
Screenshot 2023-11-08 at 5 04 25 PM

My solution has been to issue a DID Token and store it in local storage before navigating to the cross-origin isolated page. Then I use the DID Token server-side to verify the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants