<?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 CORS, Angular and Nuxeo API in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/cors-angular-and-nuxeo-api/m-p/313082#M83</link>
    <description>&lt;P&gt;Hi.. I'm working with Angular and the Nuxeo API and have come across a weird issue. I can create documents but I cannot delete/update documents and I cannot upload files. The error I get is ..&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:7000' is therefore not allowed access. The response had HTTP status code 405.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First here is my CORS config..&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component name="org.nuxeo.cors"&amp;gt;
  &amp;lt;extension target="org.nuxeo.ecm.platform.web.common.requestcontroller.service.RequestControllerService" point="corsConfig"&amp;gt;
    &amp;lt;corsConfig name="api"&amp;gt;
      &amp;lt;pattern&amp;gt;/nuxeo/site/api/.*&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;Here's a snippet of my controller that deletes a document..&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeo.document('/default-domain/workspaces/test/testdoc')
              .fetch()
              .then(function(doc){

                  //There seems to be some CORS issue with this request
                  doc.delete();

                  $location.path('/');
            
              });
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any assistance on this would be appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2016 16:44:44 GMT</pubDate>
    <dc:creator>Michael_Wedderb</dc:creator>
    <dc:date>2016-03-09T16:44:44Z</dc:date>
    <item>
      <title>CORS, Angular and Nuxeo API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cors-angular-and-nuxeo-api/m-p/313082#M83</link>
      <description>&lt;P&gt;Hi.. I'm working with Angular and the Nuxeo API and have come across a weird issue. I can create documents but I cannot delete/update documents and I cannot upload files. The error I get is ..&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:7000' is therefore not allowed access. The response had HTTP status code 405.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First here is my CORS config..&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component name="org.nuxeo.cors"&amp;gt;
  &amp;lt;extension target="org.nuxeo.ecm.platform.web.common.requestcontroller.service.RequestControllerService" point="corsConfig"&amp;gt;
    &amp;lt;corsConfig name="api"&amp;gt;
      &amp;lt;pattern&amp;gt;/nuxeo/site/api/.*&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;Here's a snippet of my controller that deletes a document..&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeo.document('/default-domain/workspaces/test/testdoc')
              .fetch()
              .then(function(doc){

                  //There seems to be some CORS issue with this request
                  doc.delete();

                  $location.path('/');
            
              });
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any assistance on this would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 16:44:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cors-angular-and-nuxeo-api/m-p/313082#M83</guid>
      <dc:creator>Michael_Wedderb</dc:creator>
      <dc:date>2016-03-09T16:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: CORS, Angular and Nuxeo API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cors-angular-and-nuxeo-api/m-p/313083#M84</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You need to configure the &lt;CODE&gt;supportedMethods&lt;/CODE&gt; for your CORS config. By default, it only handles GET, POST, HEAD, OPTIONS. See &lt;A href="https://doc.nuxeo.com/x/vIvZ"&gt;the documentation&lt;/A&gt;.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;...
&amp;lt;corsConfig name="api" supportedMethods="GET,POST,PUT,DELETE,HEAD,OPTIONS"&amp;gt;
...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Mar 2016 16:59:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cors-angular-and-nuxeo-api/m-p/313083#M84</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2016-03-09T16:59:13Z</dc:date>
    </item>
  </channel>
</rss>

