<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST CORS post no answers in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325578#M12579</link>
    <description>&lt;P&gt;That could be a factor yes. Could you try without SSL first?&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2014 13:36:19 GMT</pubDate>
    <dc:creator>Florent_Guillau</dc:creator>
    <dc:date>2014-03-18T13:36:19Z</dc:date>
    <item>
      <title>REST CORS post no answers</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325573#M12574</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;
&lt;P&gt;Currently I'm trying to do a ajax call from a.domain.com (a website) to b.domain.com (nuxeo).
In order to do this I extended the CORS with the following extension:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component name="nl.me.CORS-configuration"&amp;gt;
    &amp;lt;extension target="org.nuxeo.ecm.platform.web.common.requestcontroller.service.RequestControllerService" point="corsConfig"&amp;gt;
        &amp;lt;corsConfig name="CORS-API-CONFIG"
                    allowOrigin="https://a.domain.com &lt;A href="https://b.domain.com&amp;quot;" target="test_blank"&gt;https://b.domain.com"&lt;/A&gt;;
                    allowSubdomains='true'&amp;gt;
            &amp;lt;pattern&amp;gt;/nuxeo/api/v1/path/.*&amp;lt;/pattern&amp;gt;
        &amp;lt;/corsConfig&amp;gt;
    &amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The GET method works fine:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;jQuery.ajax({
    type: 'get',
    url: 'https://dm.openworkplace.nl/nuxeo/api/v1/path/default-domain/@children',
    crossDomain: true,
    xhrFields: {
        withCredentials: true
        }
    }
    );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However the post method does not work from a.domain.com, it does work from b.domain.com (nuxeo instance).
It does not return a answer at all...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;jQuery.ajax({
    type: 'POST',
    contentType: "application/json",
    dataType: "json",
    url: 'https://b.domain.com/nuxeo/api/v1/path/default-domain',
    data: '{"entity-type": "document", "name":"newDoc", "type": "File","properties": { "dc:title": "Specifications", "dc:description": "Created via a so cool and simple REST API", "common:icon": "/icons/file.gif", "common:icon-expanded": null, "common:size": null}}',
    crossDomain: true,
    xhrFields: {
        withCredentials: true
        });
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The same command on the b.domain.com (with the nuxeo instance) works fine.&lt;/P&gt;
&lt;P&gt;The server.log does not show anything.&lt;/P&gt;
&lt;P&gt;Do you see if I'm doing anything wrong?&lt;/P&gt;
&lt;P&gt;Thanks in advance,
Bauke&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2014 11:15:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325573#M12574</guid>
      <dc:creator>Bauke_Roo</dc:creator>
      <dc:date>2014-02-04T11:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: REST CORS post no answers</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325574#M12575</link>
      <description>&lt;P&gt;Have you tried adding &lt;CODE&gt;supportedMethods=&amp;amp;quot;GET, POST&amp;amp;quot;&lt;/CODE&gt; to the &lt;CODE&gt;&amp;amp;lt;corsConfig&amp;amp;gt;&lt;/CODE&gt; element?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2014 15:07:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325574#M12575</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2014-02-04T15:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: REST CORS post no answers</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325575#M12576</link>
      <description>&lt;P&gt;Haven't tried it yet, but according the documentation&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2014 15:12:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325575#M12576</guid>
      <dc:creator>Bauke_Roo</dc:creator>
      <dc:date>2014-02-04T15:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: REST CORS post no answers</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325576#M12577</link>
      <description>&lt;P&gt;I'm sorry Florent but it didn't work&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2014 16:49:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325576#M12577</guid>
      <dc:creator>Bauke_Roo</dc:creator>
      <dc:date>2014-02-04T16:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: REST CORS post no answers</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325577#M12578</link>
      <description>&lt;P&gt;An additional question on this. Could it be that Nuxeo is running on ssl?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 09:15:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325577#M12578</guid>
      <dc:creator>Bauke_Roo</dc:creator>
      <dc:date>2014-03-04T09:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: REST CORS post no answers</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325578#M12579</link>
      <description>&lt;P&gt;That could be a factor yes. Could you try without SSL first?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2014 13:36:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/rest-cors-post-no-answers/m-p/325578#M12579</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2014-03-18T13:36:19Z</dc:date>
    </item>
  </channel>
</rss>

