提交 d72834d6 编写于 作者: O o2null

Merge branch 'feature/cookieHttpOnly' into 'wrdp'

修改porxyServlet

See merge request o2oa/o2oa!1823
......@@ -10,6 +10,7 @@
"passwordRegexHint": "6位以上,包含数字和字母.",
"register": "disable",
"superPermission": true,
"tokenCookieHttpOnly": false,
"personUnitOrderByAsc": true,
"###captchaLogin": "是否启用验证码登录,默认值:true###",
"###codeLogin": "是否启用验证码登录,默认值:true###",
......@@ -34,5 +35,6 @@
"###failureInterval": "登录限制时间(分钟)###",
"###failureCount": "尝试登录次数###",
"###tokenExpiredMinutes": "token时长,分钟###",
"###tokenCookieHttpOnly": "保存token的cookie是否启用httpOnly###",
"###personUnitOrderByAsc": "人员组织排序是否为升序,true为升序(默认),false为降序###"
}
\ No newline at end of file
......@@ -5,18 +5,25 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.proxy.AsyncProxyServlet;
import org.eclipse.jetty.proxy.ProxyServlet;
public class Proxy extends AsyncProxyServlet {
public class Proxy extends ProxyServlet {
private static final long serialVersionUID = 2737360000716631564L;
private static final String X_Real_IP = "X-Real-IP";
// @Override
// public void init() throws ServletException {
// super.init();
// this.getHttpClient().setMaxRequestsQueuedPerDestination(10000);
// }
@Override
protected String rewriteTarget(HttpServletRequest request) {
String url = request.getRequestURL().toString();
String parameter = request.getQueryString();
return target(url, parameter, this.getServletConfig().getInitParameter("port"));
}
private String target(String url, String parameter, String port) {
......
......@@ -154,7 +154,6 @@ public class WebServerTools extends JettySeverTools {
}
}
private static void copyDefaultHtml() throws Exception {
File file = new File(Config.dir_config(), "default.html");
if (file.exists() && file.isFile()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册