I have been using Stripe elements for a while and today I was making some changes to my website without any problems all my JS ran fine and at around 7 GMT +1 I got the error you see in the title :

Everything still works in my staging and production environments as these are running as HTTPS but it makes local development more difficult.
Hi @DennisdeBest - this error appears when you use a Live Mode publishable key with Stripe.js in an environment that isn't being served over HTTPS. In your case, it sounds like you're working in a local environment without HTTPS. This error won't appear if you use a Test Mode key in your development environment.
You can find your test mode publishable key on your dashboard, or by checking out this page while logged in to Stripe: https://stripe.com/docs/keys#api-keys
I hope that helps to clear things up!
Pardon my stupidity I rsynced some configuration the wrong way around, thank you for pointing this out
what should i do to work in live mode?
@Mkhira

Most helpful comment
Hi @DennisdeBest - this error appears when you use a Live Mode publishable key with Stripe.js in an environment that isn't being served over HTTPS. In your case, it sounds like you're working in a local environment without HTTPS. This error won't appear if you use a Test Mode key in your development environment.
You can find your test mode publishable key on your dashboard, or by checking out this page while logged in to Stripe: https://stripe.com/docs/keys#api-keys
I hope that helps to clear things up!