개발 한 스푼

크롬 mixed-content 보안 이슈

idleday 2023. 8. 9. 08:31

출근전 배포하다 갑자기 소환당한 문제..

 

mixed-content 

  • https 사이트에서 ajax로 http 사이트에 request를 요청해서 발생
  • https인 홈페이지에 외부 경로의 파일을 http로 불러와서 생기는 오류

 

해결방법

  1.  html파일 헤더에 <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> 추가
  2. 외부 경로들(jQuery 스크립트, 이미지 등)을 모두 https 또는 //로 변경 

 

배운점

  • 외부리소스 주소는 운영기준으로! 

 

참고) https://cheershennah.tistory.com/m/158 

 

크롬 브라우저 보안성 향상 업데이트 이슈(Mixed content)

Chrome 은 보안성 향상 및 https로 전환을 유도하기 위해 혼합 콘텐츠 차단에 대한 일정을 발표하였다. 크롬 단계별 보안차단 업데이트 내용 Mixed content(혼합 콘텐츠)란 ? 최초 HTML이 안전한 HTTPS 연결

cheershennah.tistory.com