String protocol = request.getProtocol();
http | HTTP/1.1 |
https | SSLv3 |
boolean secure = request.isSecure();
http | false |
https | true |
※ protocol을 확인 후 https로 변경후 reload한다.
if(window.location.protocol != "https:") {
window.location.protocol = "https:";
window.location.reload();
location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
location.href = location.href.replace(/^http:/, 'https:')
}