Wednesday, 15 September 2010

Javascript security / cross scripting on same server -


Make some javascript for which I have to work through:

: // localhost < / P>

: // servername

: / www.domainnamefortheserver.com

When I run a script from IFRAME referenced to the domain - it does not load.

Thanks

Is there a way to identify JavaScript security models as server names, localhosts, and domains as "domains"?

Thanks

If you are running on Unix, You can edit / etc / hosts to provide fake DNS entries.

For example

127.0.0.1 localhost www.domainnamefortheserver.com

Then you can always add it as the correct name, even if it is still Do not live on the live site. Try and do not break javascript protection directly.

This will also work on OSX. Windows works differently, I hope.


No comments:

Post a Comment