diff --git a/supplier/spring-http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java b/supplier/spring-http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java index 77978dbc..228c3eb4 100644 --- a/supplier/spring-http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java +++ b/supplier/spring-http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierConfiguration.java @@ -68,23 +68,18 @@ public class HttpSupplierConfiguration { .codecConfigurer(serverCodecConfigurer) .crossOrigin((crossOrigin) -> crossOrigin.origin(httpSupplierProperties.getCors().getAllowedOrigins()) .allowedHeaders(httpSupplierProperties.getCors().getAllowedHeaders()) - .allowCredentials(httpSupplierProperties.getCors().getAllowCredentials())) - .autoStartup(false)) + .allowCredentials(httpSupplierProperties.getCors().getAllowCredentials()))) .enrichHeaders((headers) -> headers.headerFunction(MessageHeaders.CONTENT_TYPE, (message) -> (MediaType.APPLICATION_FORM_URLENCODED .equals(message.getHeaders().get(MessageHeaders.CONTENT_TYPE, MediaType.class))) ? MediaType.APPLICATION_JSON : null, true)) - .toReactivePublisher(); + .toReactivePublisher(true); } @Bean - public Supplier>> httpSupplier(Publisher> httpRequestPublisher, - WebFluxInboundEndpoint webFluxInboundEndpoint) { - - return () -> Flux.from(httpRequestPublisher) - .doOnSubscribe((subscription) -> webFluxInboundEndpoint.start()) - .doOnTerminate(webFluxInboundEndpoint::stop); + public Supplier>> httpSupplier(Publisher> httpSupplierFlow) { + return () -> Flux.from(httpSupplierFlow); } }