Forum

Thread tagged as: Problem, Error

Access denied: Cross-domain security error

I use Viewport Resizer a lot for quick checks on responsive changes when building a site. I notice since upgrading any site to Perch: 2.8.13 I can no longer use this tool as I get the error...

Access denied: Cross-domain security error

This might be a pointer to something wrong with the latest Perch build?

David Owen

David Owen 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think so - what do you get the error on?

....actually a similar tool https://www.responsinator.com does not work on these sites either.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm not familiar with these tools. Can you tell me what request is failing and how?

Using Safari pop up error

All these tools don't work.... See here https://www.responsinator.com/?url=http%3A%2F%2Fwww.kingbricks.co.uk%2F

or this https://mattkersley.com/responsive/ using www.kingbricks.co.uk

They just show blank

The latter tools just don't display a 2.8.13 site. The Viewport Resizer fires a browser warning popup. Tested two different 2.8.13 sites so far.

It's something in Perch 2.8.13 I just don't know what. Viewport Resizer bookmarklet can display the logged control panel of earlier versions.

Just checked using only Perch 2.8.13 and nothing else on a dev domain and I get this browser popup error.

Not crucial but very much a big hindrance as clients use these tools so I can demonstrate the responsive nature of the site I'm building for them.

Mind you would this "Access denied: Cross-domain security error" create issues elsewhere? I thought you should know.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does it make any difference if you add this to your config.php ?

define('PERCH_SECURITY_HEADERS', false);

Sorry that does not make any apparent difference.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, that's the only likely change.

Dang... is that all you can do?

Drew McLellan

Drew McLellan 2638 points
Perch Support

With the information provided, yes. If you can tell me which request you're getting that error on I could try to debug it.

All these services are displaying the site in an iFrame. At the very top of list of errors inspecting in Chrome is this.

Refused to display 'https://mysite.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

This is a far as a site gets on load. I see where now in Perch and understand (if needed) I could disable this just for the testing period. Unless you'd want a different solution?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, turning off PERCH_SECURITY_HEADERS in dev mode should resolve that. I'm surprised that it's not doing so. Are you sure the page was fully reloaded and not cached?

Ah I probably was not in dev mode.