Is there a way to enable CORS on Github pages?

后端 未结 3 855
南方客
南方客 2020-12-31 05:12

I\'m hosting some JSON files on Github pages, but I am unable to use $.getJSON to retrieve them unless they come from the exact same domain.

Is there a

3条回答
  •  孤城傲影
    2020-12-31 05:58

    Github Pages now has CORS enabled.

    The CORS header:

    Access-Control-Allow-Origin: *
    

    Is added by default on all responses from Github pages!

提交回复
热议问题