Commit f4bbbf3a authored by zhouqian's avatar zhouqian

get protocol

parent 86a2fbb9
......@@ -55,4 +55,8 @@ public interface IBaseController {
return ip;
}
default String getProtocol() {
return StringUtils.startsWith(getRequest().getHeader("x-forwarded-proto"), "https") ? "https" : "http";
}
}
package cn.quantgroup.xyqb.util;
import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment