Programming/Javascript
접속 페이지를 https로 보내기
옥수수빵
2022. 3. 29. 13:27
728x90
window.addEventListener("DOMContentLoaded", () => {
if(location.protocol !== "https:") {
location.replace(`https://${ location.host }${ location.pathname }${ location.search }`);
}
});
반응형