代码拉取完成,页面将自动刷新
需要调整配置信息,去适配nginx反向代理
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
/**
* get Http Context full Path,if port equals 80 or 443 is omitted.
*
* @return String eg:http://192.168.1.20:9080/webcontext or
* http://www.website.com/webcontext
*/
public static String getHttpContextPath(HttpServletRequest httpServletRequest) {
ApplicationConfig applicationConfig = (
ApplicationConfig) WebContext.getBean("applicationConfig");
_logger.trace("Config ServerPrefix " + applicationConfig.getServerPrefix());
_logger.trace("Config DomainName " + applicationConfig.getDomainName());
_logger.trace("ServerName " + httpServletRequest.getServerName());
String httpContextPath ="";
if (httpServletRequest.getServerName().matches(ipAddressRegex)
||httpServletRequest.getServerName().equalsIgnoreCase("localhost")) {
String scheme = httpServletRequest.getScheme().toLowerCase();
httpContextPath = scheme + "://"+httpServletRequest.getServerName();
}else {
httpContextPath = applicationConfig.getServerName();
}
int port = httpServletRequest.getServerPort();
if(!(port==80 || port==443)){
httpContextPath += ":" + port;
}
httpContextPath += httpServletRequest.getContextPath() + "";
_logger.trace("httpContextPath " + httpContextPath);
return httpContextPath;
}
登录 后才可以发表评论