rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erin Noe-Payne <erin.noe.pa...@gmail.com>
Subject Re: Using Wookie proxy behind rave
Date Fri, 07 Jun 2013 15:29:14 GMT
On Fri, Jun 7, 2013 at 5:03 AM, Gonzalo Aguilar Delgado
<gaguilar@aguilardelgado.com> wrote:
> Hi Scott,
>
> I can say that the widget is rendered into a IFrame as you said. I tested
> other widgets and they also fail with chrome. Maybe it has something to do
> with Chrome not with Wookie or Rave.
>
> Everything works perfect with Firefox.

Do you have the latest version of Firefox? Earlier versions were more
lax in enforcing port number in SOP.

>
> Have to do some other tests...
>
>
> El 07/06/13 10:29, Scott Wilson escribió:
>
>> On 6 Jun 2013, at 21:00, Erin Noe-Payne wrote:
>>
>>> The widgets are iframes. Open the inspector in chrome or firefox and
>>> you should be able to identify the iframe elements and the url from
>>> which they are hosted:
>>>
>>> <iframe src="...">
>>>
>>> The error you are seeing is because the widgets are violating the
>>> same-origin policy, making a request to a different origin from where
>>> they are hosted. If that iframe src url is a different origin from the
>>> wookie proxy server then it will cause that error.
>>>
>>> In a default deployment rave hosts the gadgets, wookie, and shindig
>>> all from the same origin. If you want to host wookie from a different
>>> origin and you want to make a request from a gadget then I believe you
>>> need to host that gadgets from that same origin.
>>
>> I'm not sure Erin.
>>
>> Normally the widget would call /proxy?url=actual_url within its own origin
>> (on port 8180). So there isn't a requirement AFAIK that both Rave and Wookie
>> have to be on the same port, at least for this purpose.
>>

Correct, rave and wookie do not need to be hosted on the same origin.
But the iframe url needs to match the origin of the proxy server,
which I believe means the wookie gadgets need to be hosted from that
origin. I'm definitely not 100% though.

>> if Wookie is running on 8180, and so is its proxy server, then I don't
>> understand why it would be trying to connect with Rave on 8080.
>>
>> I wonder if this problem has nothing to do with proxied access? Do other
>> widgets also generate the same error without invoking a proxied URL?
>>
>>> On Thu, Jun 6, 2013 at 2:58 PM, Scott Wilson
>>> <scott.bradley.wilson@gmail.com> wrote:
>>>>
>>>> On 6 Jun 2013, at 19:31, Gonzalo Aguilar Delgado wrote:
>>>>
>>>>> Hello Scott,
>>>>>
>>>>> Mmmmm. My eyes grew a lot when I've seen that it works perfectly on
>>>>> Firefox.
>>>>>
>>>>> It seems that Chromiun has something stricter. I don't know if this a
>>>>> special setting or not.
>>>>>
>>>>> Anyway I'm implementing a proxy based on Wookie one just in case it's
>>>>> not an IFrame.
>>>>>
>>>>> I cannot tell much about how it's rendered but it's rave default. It
>>>>> seems to be an IFrame to me since the code for the widget does not shows
in
>>>>> the source view of the page.
>>>>>
>>>>> Mmmmm. That's curious.
>>>>>
>>>>> Someone should investigate what's happening with Chromium. I will try
>>>>> later.
>>>>
>>>> Its odd given that the widget appears to be in:
>>>>
>>>>
>>>>>>> http://localhost:8180/wookie/
>>>>
>>>> With a proxy at:
>>>>
>>>>>>> &proxy=http://localhost:8180/wookie/
>>>>
>>>> And yet we have this attempt to access:
>>>>
>>>>>>> http://localhost:8080/level2-rave-overlay-portal/app/page/view/5
>>>>
>>>> Which I presume isn't the proxied URL you're after?
>>>>
>>>> Something doesn't add up here...
>>>>
>>>>>
>>>>> El 06/06/13 20:23, Scott Wilson escribió:
>>>>>>
>>>>>> Hi Gonzalo,
>>>>>>
>>>>>> On 6 Jun 2013, at 18:23, Gonzalo Aguilar Delgado wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I'm using wookie to deploy my widgets to rave. I've found something
>>>>>>> that I don't know how handle.
>>>>>>>
>>>>>>> When developing in wookie you have a proxy that is managed by
>>>>>>> policies and it allows you to via javascript make queries to
domains that
>>>>>>> are outside the server.
>>>>>>>
>>>>>>> While this works out of the box, when you deploy the widget to
rave
>>>>>>> it does not work. Chromiun says something like:
>>>>>>>
>>>>>>> Unsafe JavaScript attempt to access frame with URL
>>>>>>> http://localhost:8080/level2-rave-overlay-portal/app/page/view/5
from frame
>>>>>>> with URL
>>>>>>> http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead_count/in...0/wookie/proxy&st=#rpctoken=UKly2b&oahParent=http%3A%2F%2Flocalhost%3A8080
>>>>>>> <http://localhost:8180/wookie/deploy/clt.level2crm.com/widgets/lead_count/index.html?idkey=ABsgy0qnz3zyxeXVX12nlAp4lOw.eq.&proxy=http://localhost:8180/wookie/proxy&st=#rpctoken=UKly2b&oahParent=http%3A%2F%2Flocalhost%3A8080>.
>>>>>>> Domains, protocols and ports must match.
>>>>>>>
>>>>>>>
>>>>>>> This is because wookie is running on port 8180 and Rave is running
in
>>>>>>> port 8080. When making a call to the wookie proxy it fails.
>>>>>>>
>>>>>>> How should I work around this problem. I suppose that Rave must
have
>>>>>>> it's own proxy or run everything on same port. But I don't want
to run
>>>>>>> everything on the same container, and maybe not even same machine.
>>>>>>>
>>>>>>> What do you think?
>>>>>>
>>>>>> The W3C Widgets are normally rendered within iFrames so a call to
the
>>>>>> proxy server would be to the same origin, so I'm not sure what is
happening
>>>>>> here. Are the widgets in IFrames, or rendered inline somehow within
Rave?
>>>>>>
>>>>>>> Thank you in advance.
>>>>>>>
>>>>>> S
>
>

Mime
View raw message