Stripe elements not working in live mode

My app uses Stripe elements (not the native plugin) to display a credit card form. It works fine in test mode, but when I switch to live mode, I get the error

Live Stripe.js integrations must use HTTPS

and won’t render the form. How do I get live mode to work? I’m about to launch the app to the public, but can’t until this is resolved.

Thanks.

It turns out that it was because I was testing with --livereload . Without livereload, it works fine.