question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

X-Cross-Origin is being enforced

See original GitHub issue

NWJS Version : nwjs-sdk-v0.39.0-beta1-win-x64, nwjs-sdk-v0.38.3-win-x64, nwjs-sdk-v0.37.5-win-x64 Operating System : Windows 2008 R2

Expected behavior

Site referenced in <iframe> would load without being blocked.

Actual behavior

www.thecse.com refused to connect, console error:

Refused to display 'https://www.thecse.com/en/listings/mining/generation-mining-limited' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Adding following to package.json does not help:

"chromium-args":" --disable-site-isolation-trials --disable-web-security --user-data-dir=./nwjs-user-data-dir --disable-sync --disable-background-networking --disable-component-update --enable-spell-checking"

How to reproduce

  • create a hello world nwjs app
  • include <iframe id='oQuoteIFrame' src='https://www.thecse.com/en/listings/mining/generation-mining-limited'></iframe>
  • load app, iframe is being blocked.

iframe blocked

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rogerwangcommented, Nov 13, 2019

The X-Frame-Options workaround should be used in an iframe with the nwfaketop property. So I’m closing this issue as it works as expected.

1reaction
rogerwangcommented, Jun 5, 2019

Yes. This is a bug and will look to fix it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cross-Origin Resource Sharing (CORS) - MDN Web Docs
The CORS mechanism supports secure cross-origin requests and data transfers between browsers and servers. Modern browsers use CORS in APIs such ...
Read more >
The ultimate guide to enabling Cross-Origin Resource ...
Our web browsers enforce the same-origin policy, which restricts resource sharing across different origins. Cross-origin resource sharing, ...
Read more >
3 Ways to Fix the CORS Error — and How the Access-Control ...
Exactly like the previous solution, you're utilizing the fact that the same origin policy is not enforced within server-to-server communication.
Read more >
Complete Guide to CORS - Reflectoring
The CORS protocol is enforced only by the browsers. The browser does this by sending a set of CORS headers to the cross-origin...
Read more >
Cross-origin resource sharing - Wikipedia
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found