← Back to team overview

dhis2-devs team mailing list archive

Re: CORS: accessing HTTP from HTTPS

 

Maybe http://my-dhis2-analytics-call.json/?etc needs to be
https://my-dhis2-analytics-call.json/?etc ?

On Thu, Sep 29, 2016 at 1:09 PM, Greg Rowles <greg.rowles@xxxxxxxxx> wrote:

> Hi Devs
>
> Sorry, I'm running into all kinds of issues with CORS today:
>
> Mixed Content: The page at 'https://my-source-page.html' was loaded over
> HTTPS, but requested an insecure XMLHttpRequest endpoint '
> http://my-dhis2-analytics-call.json?etc'. This request has been blocked;
> the content must be served over HTTPS.
>
> Any suggestions for amending my ajax call below? I'm accessing http from
> https, guessing my headers:need to be configured correctly:
>
>
>  $.ajax({
> url: base + dxAPI,
> headers: { "Authorization": 'Basic ' + btoa(user + ':' + pwd) },
> timeout: 30000,
> crossDomain: true,
> success : function(data){ ...etc
>
> Works wonderfully from regular HTTP.
>
> Regards,
> Greg
>
>
> --
> *Health Information Systems Program - South Africa*
> *- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - -
> - *
> Mobile  :    073 246 2992
> Landline:   021 851 2216
> Skype:      gregory_rowles
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

Follow ups

References