I have an HTTPS Gatsby site at https://nervous-stonebraker-07cdb0.netlify.com/
I am trying to fire an XHR request to grab bus schedule data from my city’s public bus schedule API. That API is hosted with HTTP.
In various browsers, I am receiving errors:
Chrome: Mixed Content: The page at ‘’ was loaded over HTTPS, but requested an insecure resource ‘’. This request has been blocked; the content must be served over HTTPS.
Firefox: Blocked loading mixed active content…
Is there anything I can do on my side? Can I opt to request HTTP content?
@Dennis Thanks for checking in! A lot of the example _redirects involve an internal backend. I’m having difficulty making this approach work for my use case with an external resource. My project is a one-page Gatsby app, the only page I care about is home “/”. The http resource is “http://webservices.nextbus.com/service/publicJSONFeed?…”
I’ve tried many iterations of:
/* http://webservices.nextbus.com/service/* 200!
What should the _redirect syntax for this look like?
Hey Dennis, Not meaning to hijack this post but I am having a very similar issue with a react project/quote api and I am having no luck, I have tried many different things but nothing has panned out so far. Wondering if the OP ever had his issue resolved.
Hi, @williycole. It would help us to know what you tried and what the results were. Also, a link to the site where the redirects are not working (or the API ID for the site if you don’t want to share it publicly) would allow our support team to take a look at the actual site to see why it isn’t working.
Hey Luke, I am currently experiencing a problem similar to this. I’m trying to build a React project with an external API. the _redirects file in my public folder is shown below:
/* http://api.mediastack.com/v1/news?:splat 200
still getting the same mixed content error when deployed. what do you suggest I try?
EDIT
After an hour, figured out I was doing it the wrong way. Posting this in case anybody else needs it.
First off, after a little tweaking, I realised that the way i was trying to configure my _redirects file was wrong. Just like what some solutions examples above suggest, it should look something like this:
/api/* http://api.mediastack.com/v1/:splat 200
However, what some examples failed to state is that rather than making API calls the usual way with fetch or axios as below: