public class AllowSymLinkAliasChecker extends java.lang.Object implements ContextHandler.AliasCheck
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
Java Files.readSymbolicLink(Path)
and Path.toRealPath(java.nio.file.LinkOption...)
APIs to check if a file is aliased with symbolic links.
Constructor and Description |
---|
AllowSymLinkAliasChecker() |
Modifier and Type | Method and Description |
---|---|
boolean |
check(java.lang.String uri,
Resource resource)
Check an alias
|
public boolean check(java.lang.String uri, Resource resource)
ContextHandler.AliasCheck
check
in interface ContextHandler.AliasCheck
uri
- The path the aliased resource was created forresource
- The aliased resourcedCopyright © 1995–2023 Webtide. All rights reserved.