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

CORS Allowed in IFrameDialog #242

Closed
superthumper opened this issue Feb 19, 2019 · 3 comments
Closed

CORS Allowed in IFrameDialog #242

superthumper opened this issue Feb 19, 2019 · 3 comments

Comments

@superthumper
Copy link

Category

[ ] Enhancement

[ ] Bug

[x ] Question

Version

Please specify what version of the library you are using: [ 1.11.0 ]

Expected / Desired Behavior / Question

I am trying to open an IFrame that is in another domain. Is that allowed with the IFrameDialog? Doing this within a webpart is allowed, but it seems to be a problem withing the dialog.

Observed Behavior

Dialog appears. Spinner appears. Console Errors:

SCRIPT70: Permission denied IFrameDialogContent.tsx (44,16),

SEC7120: [CORS] The origin 'https://localhost:4321' failed to allow a cross-origin document resource at 'ms-appx-web:///assets/errorpages/forbidframingedge.htm#https://www.google.com/maps?width=100%25&height=600&hl=en&q=12909+Apple+View+Lane,+Burnsville,+MN+(My+Business+Name)&ie=UTF8&t&z=14&iwloc=B&output=embed'.

Steps to Reproduce

set up the iframe dialog like this in the [webpart].tsx

<IFrameDialog
url={'https://maps.google.com/maps?width=100%&amp;height=600&amp;hl=en&amp;q=12909%20Apple%20View%20Lane%2C%20Burnsville%2C%20MN+(My%20Business%20Name)&amp;ie=UTF8&amp;t=&amp;z=14&amp;iwloc=B&amp;output=embed'}
hidden={false}

            width={'570px'}
            height={'315px'} />
@AJIXuMuK
Copy link
Collaborator

Hi @superthumper
Could you please explain what do you mean under "allowed in webpart but not allowed in dialog"?

If I do something like that in a webpart:

<iframe src={'https://www.google.com/maps'} style={{
                border: 0,
                width: '800px',
                height: '500px'
              }} />

I'll get Refused to display 'https://www.google.com/maps' in a frame because it set 'X-Frame-Options' to 'sameorigin'. and the web part will look like that:
Screen Shot 2019-05-17 at 12 18 37 PM
Same behavior as with the IFrameDialog

@ghost
Copy link

ghost commented Aug 28, 2023

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.

@ghost ghost closed this as completed Sep 4, 2023
@ghost
Copy link

ghost commented Sep 4, 2023

Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.

This issue was closed.
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