public OpenAPI customOpenAPI() { Server server = new Server(); server.setUrl(baseUrl + contextPath); List<Server> servers = new ArrayList<>(); servers.add(server); return new OpenAPI() .components(new Components().addHeaders("Access-Control-Allow-Origin", "*")) .servers(servers) .info(new Info().title("API Server").description( "Description")); }
Is there a way to add headers like this? mine isn't working.
2.1m questions
2.1m answers
60 comments
57.0k users