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

13번째 줄: 13번째 줄:


==해결방법==
==해결방법==
*cdn.rawgit.com 로 접근하면 사용 가능
*cdn.rawgit.com 로 접근하면 사용 가능<ref>정확하게는... rawgit.com은 non-production판, cdn.rawgit.com은 production판</ref>
<source lang='html5'>
<source lang='html5'>
<link rel="stylesheet" href="//cdn.rawgit.com/xdan/datetimepicker/master/jquery.datetimepicker.css">
<link rel="stylesheet" href="//cdn.rawgit.com/xdan/datetimepicker/master/jquery.datetimepicker.css">
23번째 줄: 23번째 줄:
*[[GitHub]]
*[[GitHub]]
*[[CDN]]
*[[CDN]]
==주석==
<references/>
==참고 자료==
*http://stackoverflow.com/questions/17341122/link-and-execute-external-javascript-file-hosted-on-github


[[분류: GitHub]]
[[분류: GitHub]]
[[분류: CDN]] ‎
[[분류: CDN]] ‎

2015년 1월 26일 (월) 17:20 판

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 해결방법

  • cdn.rawgit.com 로 접근하면 사용 가능[1]
<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판

5 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}