블로그 이름

[ERROR] Failed to find a valid digest in the 'integrity' attribute for resource 본문

개발/오류

[ERROR] Failed to find a valid digest in the 'integrity' attribute for resource

Hide 2025. 8. 31. 17:19
에러로그는 다음과 같다.
Failed to find a valid digest in the 'integrity' attribute for resource 'http://111.111.11.11:7070/5-es2015.해시값...js' with computed SHA-384 integrity 'PPtH5Ef2TzD5FfSlWDOT/5qpFVsjq2OknGZxdVOoFaxS7cIHQFwxkQXjruTIkM4K'. The resource has been blocked.

 

 

 

서버 경로의 webapps\html\index.html 파일에 톰캣이 켜진 후에 로그인 시 콘솔에서 발생하는 에러인데

에러에 표시되는 파일명 + sha384 해시가 누락되어 발생, 파일명 + 해시 확인하여 index.html에 스크립트 태그 추가하여 해결하였다.

 

<script src="파일명.js" crossorigin="anonymous" type="module" integrity="sha384-해시"></script>