davsclaus commented on issue #416:
URL:
https://github.com/apache/camel-k-runtime/issues/416#issuecomment-1096385428
You need to enable CORS in the rest configuration.
```
restConfiguration().enableCORS();
rest().post("/hello")
.enableCORS(true)
.route()
.setBody().constant("Ciao");
```
The `.enableCORS(true)` that you do is for fine grained control to turn
on|off CORS per service.
So to always return CORS headers then do:
```
restConfiguration().enableCORS();
rest().post("/hello")
.route()
.setBody().constant("Ciao");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]