본문 바로가기
Web Development/Java

[JAVA]http -> https

by 피치피치어피치 2017. 10. 30.
반응형
    
String URL = request.getRequestURL().toString();
if(url.startWith("http://") && url.indexOf("localhost") < 0){
        url = url.replaceAll("http://","https://");
        response.sendRedirect(url);
}
반응형