dimanche 19 juin 2016

Pulling HTTP data using Ajax CORS


I'm making a site that lists all my Public repositories, but I'm having an issue with Cross Origin (I'm hosting it with the same people that my repos are hosted on), and I'm not sure how to do it. I tried using the JQuery.load() method, but it doesn't work with Cross Origin requests, so I'm not entirely sure how to do this... I tried the blow Ajax request but it still complains about Cross Origin:

$.ajax({
            url: "http://www.gitlab.com/u/roconnor .projects-list",
            type: "GET",
            dataType: "html",
            crossDomain: true
            })

UPDATE:

The duplicate didn't solve my issue, please see below for my whole error:

XMLHttpRequest cannot load http://www.gitlab.com/u/roconnor%20.projects-list. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://roconnor.gitlab.io' is therefore not allowed access.


Aucun commentaire:

Enregistrer un commentaire