
hudson.DefaultRequestRootPathProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hudson-core Show documentation
Show all versions of hudson-core Show documentation
Contains the core Hudson code and view files to render HTML.
The newest version!
package hudson;
import javax.servlet.http.HttpServletRequest;
public class DefaultRequestRootPathProvider implements RequestRootPathProvider {
private static final String REQUEST_ROOT_PATH = "X-Request-Root-Path";
@Override
public String getRootPath(HttpServletRequest req) {
if (req != null) {
String rootPath = req.getHeader(REQUEST_ROOT_PATH);
if (rootPath == null) {
rootPath = req.getContextPath();
}
return rootPath;
} else {
return "/";
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy