<?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 Nuxeo EP shouldn't require authentication for CORS preflight requests in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-ep-shouldn-t-require-authentication-for-cors-preflight/m-p/315332#M2333</link>
    <description>&lt;P&gt;I am unable to make cross-domain requests to Nuxeo's Automation REST service, using jQuery, because the server is requiring that the client authenticate before it will answer the OPTIONS CORS request. I don't think that is valid, the server should not require authentication for CORS preflight requests - this can be achieved in tomcat with something along those lines:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;LimitExcept OPTIONS HEAD&amp;gt;
  Require valid-user
&amp;lt;/LimitExcept&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Below is a trace that demonstrates the problem, any workaround welcome, jQuery won't proceed upon receving a 401:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8083/nuxeo/site/automation/Document.GetChildren" target="test_blank"&gt;http://localhost:8083/nuxeo/site/automation/Document.GetChildren&lt;/A&gt;

OPTIONS /nuxeo/site/automation/Document.GetChildren HTTP/1.1
Host: localhost:8083
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Origin: &lt;A href="http://localhost:8080" target="test_blank"&gt;http://localhost:8080&lt;/A&gt;
Access-Control-Request-Method: GET
Access-Control-Request-Headers: authorization
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="Nuxeo Automation"
Content-Type: text/html;charset=utf-8
Content-Length: 954
Date: Mon, 22 Oct 2012 10:04:46 GMT
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 22 Oct 2012 12:22:16 GMT</pubDate>
    <dc:creator>franck102_</dc:creator>
    <dc:date>2012-10-22T12:22:16Z</dc:date>
    <item>
      <title>Nuxeo EP shouldn't require authentication for CORS preflight requests</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-ep-shouldn-t-require-authentication-for-cors-preflight/m-p/315332#M2333</link>
      <description>&lt;P&gt;I am unable to make cross-domain requests to Nuxeo's Automation REST service, using jQuery, because the server is requiring that the client authenticate before it will answer the OPTIONS CORS request. I don't think that is valid, the server should not require authentication for CORS preflight requests - this can be achieved in tomcat with something along those lines:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;LimitExcept OPTIONS HEAD&amp;gt;
  Require valid-user
&amp;lt;/LimitExcept&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Below is a trace that demonstrates the problem, any workaround welcome, jQuery won't proceed upon receving a 401:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8083/nuxeo/site/automation/Document.GetChildren" target="test_blank"&gt;http://localhost:8083/nuxeo/site/automation/Document.GetChildren&lt;/A&gt;

OPTIONS /nuxeo/site/automation/Document.GetChildren HTTP/1.1
Host: localhost:8083
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Origin: &lt;A href="http://localhost:8080" target="test_blank"&gt;http://localhost:8080&lt;/A&gt;
Access-Control-Request-Method: GET
Access-Control-Request-Headers: authorization
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="Nuxeo Automation"
Content-Type: text/html;charset=utf-8
Content-Length: 954
Date: Mon, 22 Oct 2012 10:04:46 GMT
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Oct 2012 12:22:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-ep-shouldn-t-require-authentication-for-cors-preflight/m-p/315332#M2333</guid>
      <dc:creator>franck102_</dc:creator>
      <dc:date>2012-10-22T12:22:16Z</dc:date>
    </item>
  </channel>
</rss>

