Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to enable CORS on Github pages?

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 way to enable CORS for Github pages?

like image 365
Daniel X Moore Avatar asked Sep 20 '13 18:09

Daniel X Moore


People also ask

Is it possible to bypass CORS?

CORS is essentially controlled by the Access-Control-Allow-Origin (ACAO) header on server, and nothing you do on the client can bypass this restriction.

How do you get around CORS restrictions?

Two methods: Install a chrome extension to Access-control-allow-origin to allow cross-origin redirects. extention will allow if your backend server is on your local machine.


1 Answers

Github Pages now has CORS enabled.

The CORS header:

Access-Control-Allow-Origin: *

Is added by default on all responses from Github pages!

like image 122
Daniel X Moore Avatar answered Oct 22 '22 14:10

Daniel X Moore