모바일 개발 (웹,앱,UI)

자바스크립트로 https ssl 아니면 https로 이동시키기

4FLIX 2025. 4. 7. 14:37
반응형
if (location.protocol !== 'https:') {
    location.replace(`https:${location.href.substring(location.protocol.length)}`);
}

 

참 쉽죠?

반응형