File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/main/java/top/meethigher/proxy/http Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 9
9
import io .vertx .ext .web .Route ;
10
10
import io .vertx .ext .web .Router ;
11
11
import io .vertx .ext .web .RoutingContext ;
12
+ import io .vertx .ext .web .handler .FileSystemAccess ;
12
13
import io .vertx .ext .web .handler .StaticHandler ;
13
14
import org .slf4j .Logger ;
14
15
import org .slf4j .LoggerFactory ;
@@ -365,7 +366,8 @@ public ReverseHttpProxy addRoute(
365
366
String targetUrl = proxyRoute .getTargetUrl ();
366
367
if (targetUrl .startsWith (STATIC )) {
367
368
String staticPath = targetUrl .replace (STATIC , "" );
368
- StaticHandler staticHandler = StaticHandler .create (staticPath )
369
+ // https://github.com/vert-x3/vertx-web/issues/204
370
+ StaticHandler staticHandler = StaticHandler .create (FileSystemAccess .ROOT , staticPath )
369
371
.setDirectoryListing (false )
370
372
.setAlwaysAsyncFS (true )
371
373
.setIndexPage ("index.html" );
You can’t perform that action at this time.
0 commit comments