-
Notifications
You must be signed in to change notification settings - Fork 365
Mixed Content: The page was loaded over HTTPS, but requested an insecure resource #260
Comments
Update: After several attempts I have now gotten this far,
I am not sure what else to do, here is my handler code:
Any help is greatly appreciated. |
@kvreem what backend/frontend integration are you working with? |
@sid88in I am using the serverless-graphql boilerplate from around october. I am not sure why this is giving so much problems. here is my app-backend/ serverless.yml
|
@kvreem we have been changing/adding/enhancing backend/frontend integrations since October 2016.
If you are not sure about the same, we can hop on a quick skype call sometime next week and go through the problems. thanks |
I would love to skype! If you are available now or anytime this week please call, kareemsskype is my id. |
ok please DM on @sidg_sid on twitter and we can set something up.
|
Okay let me go ahead and dm you right now! Lets get your eyes on the code. It should be very easy for you to run locally. I will work on the PR as well but would like you to see it in action first. |
@kvreem just summarizing our conversation on skype.
Let us know your progress on the above. Looking forward. thanks |
@sid88in would it be possible to help me triage this from the headers in chrome: I really don't think its my database, do i need to somehow add headers to the request payload? |
would be great if you can create a PR and we can then debug together! thanks |
@sid88in i have the code for the PR can you walk me through the process? I cloned the repo and created my own branch but I cannot push my branch to the repo. |
I had the same issue and could solve it by changing the siteUrl from http:// to https:// |
My application works locally but when it comes time to deploy I get the following issue in the Chrome developer console.
Mixed Content: The page at 'MY URL' was loaded over HTTPS, but requested an insecure resource 'http://localhost:4000/graphql'. This request has been blocked; the content must be served over HTTPS.
I don't have any reference to localhost when I deploy so the fact I get this error is driving me crazy.
My deployment bucket is pointing to my domain, and I created a certificate and distribution to have enable HTTPS.
In my
handler.js
I have the following code and addedoutput.headers['Access-Control-Allow-Credentials'] = 'true';
because from my research this is required to work with HTTPS.My YAML looks like this for my
app-backend
And just for sanity's sake this is where I am initializing my Apollo client i replace http://localhost:4000
const networkInterface = createNetworkInterface({ uri: 'https://XXX.execute-api.us-west-1.amazonaws.com/production/graphql' });
Update:
So chrome blocks blocks my data from being fetch when the site loads, the shield on the address bar shows up and says my site wants to load unsafe scripts, so if I select to load them my app works fine, I think because it is somehow referencing http://localhost:4000/ still because nothing else i am loading is using http. But I do not know how to get away from it.
The text was updated successfully, but these errors were encountered: