"GitHub CDN 사용하기"의 두 판 사이의 차이

(→‎해결방법: Rawgit 폐쇄예정(신규주소 사용불가) - 그리고 문제랍시고 한놈, 두시기, 석삼 이딴걸내면 어쩌란건지 모르겠음)
13번째 줄: 13번째 줄:


==해결방법==
==해결방법==
* http://rawgit.com 에 가서 URL을 입력하면 CDN 주소로 바꿔줌
* https://raw.githack.com/ 에 가서 URL을 입력하면 CDN 주소로 바꿔줌
* 또는 아래와 같이 수동으로 URL을 바꿔도 사용 가능<ref>정확하게는... rawgit.com은 non-production판, cdn.rawgit.com은 production판</ref>
* 또는 아래와 같이 수동으로 URL을 바꿔도 사용 가능<ref>정확하게는... rawgit.com은 non-production판, cdn.rawgit.com은 production판</ref>
:https://github.com/xdan/datetimepicker/blob/master/jquery.datetimepicker.css
:https://github.com/xdan/datetimepicker/blob/master/jquery.datetimepicker.css

2019년 4월 15일 (월) 12:45 판

GitHub CDN 사용하기
Refused to execute script from http://raw.githubusercontent.com

1 문제상황

  • raw.githubusercontent.com 로 접근하면 거부됨
<link rel="stylesheet" href="//raw.githubusercontent.com/xdan/datetimepicker/master/jquery.datetimepicker.css">
<script src="//raw.githubusercontent.com/xdan/datetimepicker/master/jquery.datetimepicker.js"></script>

datetimepicker2.php:1 Refused to execute script from 'http://raw.githubusercontent.com/xdan/datetimepicker/master/jquery.datetimepicker.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

2 해결방법

  • https://raw.githack.com/ 에 가서 URL을 입력하면 CDN 주소로 바꿔줌
  • 또는 아래와 같이 수동으로 URL을 바꿔도 사용 가능[1]
https://github.com/xdan/datetimepicker/blob/master/jquery.datetimepicker.css
https://cdn.rawgit.com/xdan/datetimepicker/master/jquery.datetimepicker.css
<link rel="stylesheet" href="//cdn.rawgit.com/xdan/datetimepicker/master/jquery.datetimepicker.css">
<script src="//cdn.rawgit.com/xdan/datetimepicker/master/jquery.datetimepicker.js"></script>

3 같이 보기

4 참고

  1. 정확하게는... rawgit.com은 non-production판, cdn.rawgit.com은 production판
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}