[ https://issues.apache.org/jira/browse/FLINK-7532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171630#comment-16171630 ]
ASF GitHub Bot commented on FLINK-7532: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/4601#discussion_r139682161 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/DispatcherRestEndpoint.java --- @@ -77,8 +74,11 @@ protected void setupChannelHandlers(Router router, CompletableFuture<String> res optWebContent = Optional.empty(); } - optWebContent.ifPresent( - webContentHandler -> router.GET("/:*", webContentHandler)); + return optWebContent + .map(webContent -> + Collections.singleton( + Tuple2.<RestHandlerSpecification, ChannelInboundHandler>of(WebContentHandlerSpecification.getInstance(), webContent))) + .orElseGet(() -> Collections.emptySet()); --- End diff -- I would like to do this in one of the follow up PRs where I actually add more REST handlers, if that's ok. > Add StaticFileServerHandler to DispatcherRestEndpoint > ----------------------------------------------------- > > Key: FLINK-7532 > URL: https://issues.apache.org/jira/browse/FLINK-7532 > Project: Flink > Issue Type: Sub-task > Components: REST, Webfrontend > Affects Versions: 1.4.0 > Reporter: Till Rohrmann > Assignee: Till Rohrmann > Priority: Minor > Labels: flip-6 > > The {{DispatcherRestEndpoint}} should be able to server static web content. > In order to do that it should instantiate the {{StaticFileServerHandler}} if > {{flink-runtime-web}} is in the classpath. -- This message was sent by Atlassian JIRA (v6.4.14#64029)