Skip to content

Commit

Permalink
jetty 10 support #108
Browse files Browse the repository at this point in the history
addressing Jetty bug with DefaultServlet: jetty/jetty.project#8259
  • Loading branch information
andrus committed Jul 1, 2022
1 parent 80d99e3 commit 3ce6716
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import io.bootique.resource.FolderResourceFactory;
import org.eclipse.jetty.server.NetworkConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.AllowSymLinkAliasChecker;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.servlet.ErrorPageErrorHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
Expand Down Expand Up @@ -95,6 +96,10 @@ public ServerHolder createServerHolder(
ThreadPool threadPool = createThreadPool();
ServletContextHandler contextHandler = createHandler(context, servlets, filters, listeners);

// Using deprecated symlink alias checker until https://github.com/eclipse/jetty.project/issues/8259
// is implemented
contextHandler.setAliasChecks(List.of(new AllowSymLinkAliasChecker()));

This comment has been minimized.

Copy link
@joakime

joakime Jul 2, 2022

Wrong class, this one doesn't do what you think.
There's a reason it's deprecated, that class is basically an "allways true" implementation.

Use SymlinkAllowedResourceAliasChecker instead.


Server server = new Server(threadPool);
server.setStopAtShutdown(true);

Expand Down

0 comments on commit 3ce6716

Please sign in to comment.