Enabling cors in dropwizard not working
问题 I'm working on a dropwizard application and js ui to interacte with the api. I need to load json data to update views but I have to enable cors in dropwizard before that. I did some staff but it seems not working because dropwizard returns allways 204 no content. @Override public void run(final BGConfiguration configuration, final Environment environment) throws Exception { final Map<String, String> params = new HashMap<>(); params.put("Access-Control-Allow-Origin", "/*"); params.put("Access