Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
561 views
in Technique[技术] by (71.8m points)

Serve Ionic 5 Cordova application over HTTPS

Is there a way to provide Ionic 5 (Cordova) application over https ?

I work with stripe and I need to implement Stripe.js.

When i serve my application with : ionic serve --prod I have the following warning :

v3:1 You may test your Stripe.js integration over HTTP. However, live Stripe.js integrations must use HTTPS.

Is there a way to serve a Ionic 5 with cordova application in order to use Stripe.js ?

question from:https://stackoverflow.com/questions/66054991/serve-ionic-5-cordova-application-over-https

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As far as I know it's not possible to use HTTPS. There's a thread with useful details in the Ionic forums about why this isn't a viable approach.

However, Stripe.js specifically allows file://, ionic://, and httpsionic:// protocols, so using one of those should allow your app to work in production without issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...