So recently I completed the Local Weather App and I had to struggle to get it to work in the local environment. I usually upload it to Codepen once I complete the project. But now it refuses to use the HTTP request (IP-API). Does anyone know any resources that allows it to work both in the local environment AND via Codepen?
Should I just upload it anyway even though some local resources aren’t available? Or should I go back and try to make it work correctly on Codepen?
@uria
I had an error from Codepen -> Mixed Content. Basically, trying to use a GET request via the “insecure” HTTP through Codepen’s HTTPS is throwing an error for me. I’m looking for a workaround and I think I’m just going to utilize a different geolocation tactic. I’ll let you know how it goes.
@uria, thank you.
That seemed to do the trick. I used a geolocation API that was HTTPS instead of insecure. After two weeks, off and on, I have finally completed it.
Yes, I used that initially when working in the local environment. I think they have some jQuery code that I implemented. I just wish the cross-origin headers did what I wanted. Thank you again.
@asg5704 I can see the project, it looks really good btw , but for some reason it os showing me 32F although here it is more like 95F… and also the switch button isn’ t working.
I have tried to log the data from the geoip api but seens like nothing comes back…
Try using the browser api window.navigator.geolocation
If you need more help I’ll be later on with my computer then would be easier for me to help.