[
https://issues.apache.org/jira/browse/CAMEL-9855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-9855.
--------------------------------
Resolution: Duplicate
Assignee: Claus Ibsen
Duplicate of CAMEL-9761
> 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
> Assignee: Claus Ibsen
> 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 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)