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.
1.4m articles
1.4m replys
5 comments
57.0k users