HADOOP-15903. Allow HttpServer2 to discover resources in /static when symlinks are used. Contributed by Inigo Goiri.
This commit is contained in:
parent
31614bcc7c
commit
89b49167a5
|
@ -84,6 +84,7 @@ import org.eclipse.jetty.server.Server;
|
|||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.server.SessionManager;
|
||||
import org.eclipse.jetty.server.SslConnectionFactory;
|
||||
import org.eclipse.jetty.server.handler.AllowSymLinkAliasChecker;
|
||||
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
|
||||
import org.eclipse.jetty.server.handler.HandlerCollection;
|
||||
import org.eclipse.jetty.server.handler.RequestLogHandler;
|
||||
|
@ -725,6 +726,7 @@ public final class HttpServer2 implements FilterContainer {
|
|||
asm.getSessionCookieConfig().setSecure(true);
|
||||
}
|
||||
logContext.setSessionHandler(handler);
|
||||
logContext.addAliasCheck(new AllowSymLinkAliasChecker());
|
||||
setContextAttributes(logContext, conf);
|
||||
addNoCacheFilter(logContext);
|
||||
defaultContexts.put(logContext, true);
|
||||
|
@ -747,6 +749,7 @@ public final class HttpServer2 implements FilterContainer {
|
|||
asm.getSessionCookieConfig().setSecure(true);
|
||||
}
|
||||
staticContext.setSessionHandler(handler);
|
||||
staticContext.addAliasCheck(new AllowSymLinkAliasChecker());
|
||||
setContextAttributes(staticContext, conf);
|
||||
defaultContexts.put(staticContext, true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue