Forums

Stealth mode pointers (referring from another website)

(topic should be Stealth mode) Hi, I created a webapp which works fine, and bought a domain name which should address directly to my app. When in standard mode (changing the address in the browser) it works fine, but when in stealth mode (the new domain name should be in the browser), it does not. I see a blank page. Any ideas why?

Are you trying to deploy a PythonAnywhere website?

Yes.

I've fixed the topic title.

How are you setting things up so that your domain name displays your PythonAnywhere app? Is it some kind of "masked forwarding" thing you've set up with the domain registrar?

Thank you. Yes, this is domain.com, I think stealth mode is "masked forwarding".

OK -- is anything appearing in the browser developer console when you visit the domain?

The page is empty, and the code is (where XXXX is my correct web address)

<html><HEAD>

</HEAD><FRAMESET border='0' ROWS='*,1'> <FRAME SRC='http://XXXXX/'><FRAME SRC='blank.html'> </FRAMESET> </html>

My guess is that your web app is returning headers that prevent it from being loaded in an iframe. Check this by looking in your browser developer tools. There will probably be an error report that says something like that.

You're right. This is the error: "Refused to display 'http://XXXX.pythonanywhere.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'."

I have no clue how to proceed from here.

Here's some documentation on the header in question: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options. You need to set the header to allow from the domain that is trying to show the frame. Also, check the docs for your framework - there may be something in the framework about it.

Solved, thanks all