camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf Steppacher (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-9855) REST DSL rest configuration attribute enableCORS has no effect when rendering resource listing/Camel contexts
Date Mon, 11 Apr 2016 14:26:25 GMT
Ralf Steppacher created CAMEL-9855:
--------------------------------------

             Summary: REST DSL rest configuration attribute enableCORS has no effect when
rendering resource listing/Camel contexts
                 Key: CAMEL-9855
                 URL: https://issues.apache.org/jira/browse/CAMEL-9855
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.16.3
         Environment: Karaf 4.0.3, Java 8, Blueprint
            Reporter: Ralf Steppacher
            Priority: Minor


Setting the attribute {{enableCORS}} to true has no effect, i.e. none of the {{Access-Control-*}}
are set. To enable CORS headers one has to add an {{apiProperty}} element like so:

{code:xml}
<restConfiguration contextPath="{{contextpath}}" component="jetty" scheme="http" host="{{host}}"
port="{{port}}" apiContextPath="api-docs">
   <apiProperty key="cors" value="true" />
   <!-- ... -->
/>
</restConfiguration>
{code}

See {{RestSwaggerSupport::renderCamelContexts(...)}} and {{RestSwaggerSupport::renderResourceListing(...)}}.

{{RestSwaggerSupport}} adds the headers in with capital first letters: {{Access-Control-Allow-Origin}}.
However, the response contains the header names all lower case. Not sure where they loose
the capitalization. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message