Thanks Alexis. That's smart.

I've found that forcing m_universalAccess flag to true in blink_platform/ 
SecurityOrigin.cpp 
(\\third_party\WebKit\Source\platform\weborigin\SecurityOrigin.cpp)  solves all 
my CORS issues. Right now I'm hardocding the code in order to force it o true. 
Would be nice to find a way (maybe through some manifest.json field) in order 
to configure this parameter. I guess that an unrestricted setting is a quite 
common scenario for Desktop apps




-----Original Message-----
From: Alexis Menard [mailto:[email protected]] 
Sent: Wednesday, November 18, 2015 7:11 PM
To: Daní Pinart <[email protected]>
Cc: [email protected]
Subject: Re: [Crosswalk-help] CORS

Hi,

On Tue, Nov 17, 2015 at 9:46 PM, Daní Pinart <[email protected]> wrote:
> Hi Alexis, thank you for your response
>
> My apologizes for not benig accurate in my questions.
>
>
> I want enablerequests to other domains I have no control of. App 
> domain is something like "app://clodgfdnabchkpemnflehmcjkabfgpfc" and 
> I need to access to a REST Service in http://mydomain:10080/.... Right 
> now I'm getting a CORS not enabled error

Could you provide me a simple example of what you're trying to achieve. An 
index.html simple, a manifest.json and that's it.

>
> Right now I'm generating an msi supplying an icon and a manifest file 
> as shown in 
> https://crosswalk-project.org/documentation/windows/build_crosswalk_fo
> r_windows.html
>
> I have downloaded the xwalk Visual Studio solution and located de 
> XMLHttpRequest class so I hope I can do something there. The main 
> issue is that I have no idea how to debug my web app within xwalk in 
> Visual Studio neither how to generate later the msi

So in your crosswalk checkout after running gclient sync you have a .sln in 
src/xwalk. You can open that in Visual Studio (I recommend to use the Funnel 
extension to not load the entire Chromium). Then one can just press F5 (after 
selecting xwalk as the default project), build and run from there (and debug, 
provided you select Debug as a target). What I usually do is that I select 
xwalk as the startup project, and in the options I specify which file I want to 
load (and in that case I will point to the manifest.json of the installed .msi 
of your app so e.g. in the Debugging field you would add "C:\Program 
Files\....\manifest.json").

Thanks.

>
> Thanks ins advance
> -----Original Message-----
> From: Alexis Menard [mailto:[email protected]]
> Sent: Tuesday, November 17, 2015 11:45 PM
> To: Daní Pinart <[email protected]>
> Cc: [email protected]
> Subject: Re: [Crosswalk-help] CORS
>
> Hi,
>
> I'm a bit confused. In one email you're talking about bypassing CORS in the 
> other how to enable it.
>
> I've been trying the csp field and in master it works.
>
> And yes xwalk_hosts only run on Android at the moment.
>
> Thanks.
>
> On Tue, Nov 17, 2015 at 8:24 AM, Alexis Menard <[email protected]> wrote:
>> Hi,
>>
>> Windows support is still experimental so things may be broken.
>>
>> Bug has been reported
>> (https://crosswalk-project.org/jira/browse/XWALK-4988 and
>> https://crosswalk-project.org/jira/browse/XWALK-4996) and is covered 
>> by our test suite, we just didn't have time to look at these issues 
>> yet.
>>
>> Feel free to build Windows yourself
>> (https://crosswalk-project.org/documentation/windows/build_crosswalk_
>> f
>> or_windows.html) and you can debug and maybe provide a patch, 
>> Crosswalk project is open source after all.
>>
>> Thanks.
>>
>> On Tue, Nov 17, 2015 at 4:43 AM, Daní Pinart <[email protected]> wrote:
>>> Hi,
>>>
>>>
>>>
>>> Please, it’s a bit urgent to get a workaround in order to enable 
>>> CORS on Windows applications. I don’t have any control of the 
>>> server’s side so I need to find a workaround at client’s side.
>>>
>>>
>>>
>>> I’ve tried to add xwalk_hosts field into the manifest.json but I 
>>> guess it only works for android devices.
>>>
>>>
>>>
>>> Is there any way to handle this issue by building Crosswalk for 
>>> windows by myself? If so, I’d appreaciate as much guidance as 
>>> possible
>>>
>>>
>>>
>>> Thanks in advance
>>>
>>>
>>>
>>> From: Crosswalk-help
>>> [mailto:[email protected]] On 
>>> Behalf Of Daní Pinart
>>> Sent: Saturday, November 14, 2015 2:31 AM
>>> To: [email protected]
>>> Subject: [Crosswalk-help] CORS
>>>
>>>
>>>
>>> Hi
>>>
>>>
>>>
>>> Is there any way to bypass CORS on Crosswalk Windows applications?
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>> _______________________________________________
>>> Crosswalk-help mailing list
>>> [email protected]
>>> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
>>>
>
>
>


_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to