Hi all,
We are using Vertx version 3.8.5
Our javascript web application creates an event bus connection from the front end with java backend. Everything works fine in terms of communication. But when we analyzed against security eventbus info request always send 'Access-Control-Allow-Origin:*' as a header in the response. We don't need to have cross-domain requests and we use a single domain.
When further analysis with the issue we saw that it was set by 'io.vertx.ext.web.handler.sockjs.impl.BaseTransport#setCORS'. Chrome dev tools show us that the application does not send origin header in the request.
Is there a specific option that needs to be set in the Event bus initialization options on javascript side?
Following is how we initialize eventbus at the client-side
var options = {
vertxbus_reconnect_attempts_max: Infinity, // Max reconnect attempts
vertxbus_reconnect_delay_min: 1000, // Initial delay (in ms) before first reconnect attempt
vertxbus_reconnect_delay_max: 5000, // Max delay (in ms) between reconnect attempts
vertxbus_reconnect_exponent: 2, // Exponential backoff factor
vertxbus_randomization_factor: 0.5 // Randomization factor between 0 and 1
};
options.transports = ['websocket'];
this.eventBus = new EventBus(this.url,options);