Package org.eclipse.jetty.server.handler
Class AllowSymLinkAliasChecker
- java.lang.Object
-
- org.eclipse.jetty.server.handler.AllowSymLinkAliasChecker
-
- All Implemented Interfaces:
ContextHandler.AliasCheck
public class AllowSymLinkAliasChecker extends java.lang.Object implements ContextHandler.AliasCheck
Symbolic Link AliasChecker.An instance of this class can be registered with
ContextHandler.addAliasCheck(AliasCheck)to check resources that are aliased to other locations. The checker uses the JavaFiles.readSymbolicLink(Path)andPath.toRealPath(java.nio.file.LinkOption...)APIs to check if a file is aliased with symbolic links.
-
-
Constructor Summary
Constructors Constructor Description AllowSymLinkAliasChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheck(java.lang.String uri, org.eclipse.jetty.util.resource.Resource resource)Check an alias
-
-
-
Method Detail
-
check
public boolean check(java.lang.String uri, org.eclipse.jetty.util.resource.Resource resource)Description copied from interface:ContextHandler.AliasCheckCheck an alias- Specified by:
checkin interfaceContextHandler.AliasCheck- Parameters:
uri- The path the aliased resource was created forresource- The aliased resourced- Returns:
- True if the resource is OK to be served.
-
-