소스코드에서 HTTPS 리다이렉션 하는지 여부 확인 방법

잡부·2022년 10월 5일
0

HTTPS 리다이렉션 구현 돼 있는 것을 보면, 소스에서 하는 경우가 있고, WEB 설정에 의해 하는 경우가 있다. 간단하게 판단하는 법은 curl을 활용하면 쉽게 여부를 판단할 수 있다.

소스코드에서 수행하는 경우

C:\U>curl http://sourcehttps.com
<HTML>
<HEAD>
<TITLE>소스코드에서 리다이렉션 하는 경우</TITLE>
<SCRIPT language=JavaScript>
  document.location.href = "/index.jsp";
</SCRIPT>
</HEAD>
<BODY>
</BODY>

웹에서 설정으로 하는 경우

C:\>curl http://naver.com
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center> NWS </center>
</body>
</html>
profile
잡부

0개의 댓글