Cross-domain error on the same ipaddress (Different Port)

1,170 views
Skip to first unread message

Vinrael666

unread,
Aug 22, 2014, 3:22:26 AM8/22/14
to chromi...@chromium.org
Hello,
we are providing an interface for an customer application.
Now the customer asked us, to port the interface for chrome.

Everything is working fine except one thing:
We have to perform an look-up on the port 80 but our interface runs on port 7727.
Here we get an cross-domain error.
We can't use post message, because the look-up on port 80 doesn't support it.
Is there a way to enable the cross domain access for the same server?











I'm grateful for any help.

Torne (Richard Coles)

unread,
Aug 22, 2014, 4:21:11 AM8/22/14
to frielin...@gmail.com, Chromium-dev

If it's a different port then the web security model says that is *not* the same server. Scheme, host and port must all match. To access a different port you will have to go through the same steps as any other cross-origin request: have the other origin respond to requests with an Access-Control-Allow-Origin header that permits the access.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

PhistucK

unread,
Aug 22, 2014, 4:27:20 AM8/22/14
to Richard Coles, frielin...@gmail.com, Chromium-dev
However, window.open specifically does not need it (the window will open anyway), you can simply use the postMessage API, right?


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Vinrael666

unread,
Aug 22, 2014, 5:57:05 AM8/22/14
to chromi...@chromium.org, to...@chromium.org, frielin...@gmail.com
Unfortunately no. We can't access the look-up with postMessage. The problem is that the look-up gives an data value back on close.
example Open:  var returnValue = Window.Open([URL],[Parameter]);

If it's help: The Look-Up is an default entity from an Microsoft CRM 2013 System

PhistucK

unread,
Aug 22, 2014, 6:01:16 AM8/22/14
to frielin...@gmail.com, Chromium-dev, Richard Coles
Wait, does this work in any other browser?
Cross origin restrictions are not a Chrome feature, they are a standard user agent (browser) feature.


PhistucK

Torne (Richard Coles)

unread,
Aug 22, 2014, 6:06:35 AM8/22/14
to Vinrael666, Chromium-dev
On 22 August 2014 10:57, Vinrael666 <frielin...@gmail.com> wrote:
Unfortunately no. We can't access the look-up with postMessage. The problem is that the look-up gives an data value back on close.
example Open:  var returnValue = Window.Open([URL],[Parameter]);

No, this will never work (in any browser, as far as I know). Windows opened by window.open are only permitted to be connected to each other if they are the same origin, and disconnected window.open's cannot return a value.

Vinrael666

unread,
Aug 22, 2014, 6:07:05 AM8/22/14
to chromi...@chromium.org, frielin...@gmail.com, to...@chromium.org
It is working in Internet Explorer. (It works because the Server is in the trusted sites)
We also had already set the "Access-Control-Allow-Origin header" in the IIS

and i got corrected from our Devoloper:
The function is not window.open.
It is:

var returnValue = Window.ShowModalDialog(...);

PhistucK

unread,
Aug 22, 2014, 7:32:22 AM8/22/14
to Vinrael666, Chromium-dev, Richard Coles
Chrome 37 (due soon, approximately by the end of this month) and later will not support showModalDialog anymore (well, it works in an enterprise environment only if it is enabled by the Group Policy, but it will stop working completely in May, 2015).

See the blog post -


PhistucK


--

Vinrael666

unread,
Aug 25, 2014, 10:40:53 AM8/25/14
to chromi...@chromium.org, frielin...@gmail.com, to...@chromium.org
Oh s***, thank you. Really thank you for this Information. (Wouldn't be fun: get it working -> the function gets disabled)
We will programm an own website internal lookup with querrys.
Not nice, since we have to reprogramm existing function but atleast it will work. 

Thanks again for all your help!
Reply all
Reply to author
Forward
0 new messages