Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14922

Cannot enable cors on platform-http

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: camel-platform-http
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I've tried to enable cors via properties using `camel.context.rest-configuration.enable-cors=true` (but it should also happen via DSL configuration), but the platform-http component adds a parameter to the URI that is not recognized downstream: `optionsEnabled=true`.

      I've tested it with both the vertx and the quarkus implementation, both fail with the following exception:

      [2] Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: platform-http:///timeline?httpMethodRestrict=GET%2COPTIONS&optionsEnabled=true due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{optionsEnabled=true}]
      [2] 	at org.apache.camel.support.DefaultComponent.validateParameters(DefaultComponent.java:358)
      [2] 	at org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:261)
      [2] 	at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:780)
      [2] 	... 26 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ppalaga Peter Palaga
                Reporter:
                nferraro Nicola Ferraro
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m