CORS, Angular and Nuxeo API

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 ..

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access. The response had HTTP status code 405.

First here is my CORS config..

<?xml version="1.0"?>
<component name="org.nuxeo.cors">
  <extension target="org.nuxeo.ecm.platform.web.common.requestcontroller.service.RequestControllerService" point="corsConfig">
    <corsConfig name="api">

Here's a snippet of my controller that deletes a document..


                  //There seems to be some CORS issue with this request



Any assistance on this would be appreciated.

1 votes

1 answers




You need to configure the supportedMethods for your CORS config. By default, it only handles GET, POST, HEAD, OPTIONS. See the documentation.

<corsConfig name="api" supportedMethods="GET,POST,PUT,DELETE,HEAD,OPTIONS">
0 votes