code: private void configureCors(Environment environment) {
          Dynamic filter = environment.servlets().addFilter("CORS", CrossOriginFilter.class);
          filter.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
          filter.setInitParameter(CrossOriginFilter.ALLOWED_METHODS_PARAM, "GET,PUT,POST,DELETE,OPTIONS");
          filter.setInitParameter(CrossOriginFilter.ALLOWED_ORIGINS_PARAM, "*");
          filter.setInitParameter(CrossOriginFilter.ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, "*");
          filter.setInitParameter("allowedHeaders", "Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin");
          filter.setInitParameter("allowCredentials", "true");
      }
docs: Copy-pasta from http://jitterted.com/tidbits/2014/09/12/cors-for-dropwizard-0-7-x/