rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gonzalo Aguilar Delgado <gagui...@aguilardelgado.com>
Subject Re: Using Wookie proxy behind rave
Date Fri, 07 Jun 2013 18:25:50 GMT
I will take a look to this. Thank you for trying. I will check my 
version of chromium.


El 07/06/13 20:13, Scott Wilson escribió:
> Hi Gonzalo,
>
> I've had a go at replicating the problem.
>
> I set up Rave (trunk) running on port 8080.
> I set up Wookie (trunk) running on port 8100.
> I' changed portal.properties in Rave to point to port 8100 for Wookie.
> I added a W3C Widget that uses the proxy service (Weather.wgt)  to 
> Rave  and added it to my workspace.
>
> The Weather Widget renders from port 8100 OK on Safari, Firefox and 
> Chrome (Version 27.0.1453.110), accessing x-origin data using the 
> proxy, e.g.:
>
> http://localhost:8100/wookie/proxy?instanceid_key=xlspngx6TKOnHVLa1c426V4KSsA.eq.&url=http://newsrss.bbc.co.uk/weather/forecast/9/Next3DaysRSS.xml
>
> So possibly the problem lies elsewhere - hope this helps.
>
> S
>
>
>
>
> On 7 Jun 2013, at 17:30, Gonzalo Aguilar Delgado wrote:
>
>> Hi Erin,
>>
>> Didn't see this message.
>>
>>
>> El 06/06/13 22:00, Erin Noe-Payne escribió:
>>> 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.
>> But in this case it's not. It uses the wookie proxy server to make a 
>> request to another host. But gadget and wookie are in the same 
>> server. Wookie is serving the gadget. It's data what comes from 
>> another server and that's why we use the proxy inside wookie.
>>
>> This works perfectly in wookie demo.
>>
>>> 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.
>> Yes! But I think Rave is one thing and the rest is another. I want 
>> everything in the right place. This way we can escalate our 
>> architecture. Since Rave will show different widgets from different 
>> servers in the future.
>>
>>>
>>> On Thu, Jun 6, 2013 at 2:58 PM, Scott Wilson
>>> <scott.bradley.wilson@gmail.com 
>>> <mailto: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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message