# Run webView with https

**URL:** <https://forum.ionicframework.com/t/run-webview-with-https/172315>\
**Category:** Capacitor\
**Created:** [September 2, 2019, 1:50pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315 "2019-09-02T13:50:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mmadzharov](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Mmadzharov](https://forum.ionicframework.com/u/Mmadzharov)\
**Post date:** [September 2, 2019, 1:50pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/1 "2019-09-02T13:50:27Z")

</div>

Hi guys,  
I am trying to run my Ionic application with capacitor but i need the webview url to start with https. For corodova I can configure that in the config.xml with scheme, but I can’t find a solution for capaciotor?

---

<div class="post-metadata">

**Author:** ![it.hieund](https://avatars.discourse-cdn.com/v4/letter/i/4da419/32.png) [@it.hieund](https://forum.ionicframework.com/u/it.hieund)\
**Post date:** [September 4, 2019, 2:06am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/2 "2019-09-04T02:06:21Z")

</div>

@mhartington, this is also my concern. Can you give us some suggestion?  
Many thanks.

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [September 4, 2019, 6:05pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/3 "2019-09-04T18:05:56Z")

</div>

Update Capacitor to 1.2.0, it was just released with that new feature

---

<div class="post-metadata">

**Author:** ![Mmadzharov](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Mmadzharov](https://forum.ionicframework.com/u/Mmadzharov)\
**Post date:** [September 5, 2019, 9:56am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/4 "2019-09-05T09:56:23Z")

</div>

For those who are stuck on that since the documentation is not yet updated. In the capacitor.config.json  
in the server section:  
“server”: {  
“hostname”: “localhost:3000”,  
“iosScheme”: “https”,  
“androidScheme”: “https”  
},

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [September 5, 2019, 10:46am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/5 "2019-09-05T10:46:02Z")

</div>

on iOS you can’t use https, that should default to capacitor://

---

<div class="post-metadata">

**Author:** ![Mmadzharov](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Mmadzharov](https://forum.ionicframework.com/u/Mmadzharov)\
**Post date:** [September 5, 2019, 2:10pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/6 "2019-09-05T14:10:59Z")

</div>

Is that right for Cordova also

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [September 5, 2019, 2:45pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/7 "2019-09-05T14:45:19Z")

</div>

In cordova it defaults to ionic://

---

<div class="post-metadata">

**Author:** ![Seanmclements](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Seanmclements](https://forum.ionicframework.com/u/Seanmclements)\
**Post date:** [February 12, 2020, 3:39am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/8 "2020-02-12T03:39:01Z")

</div>

This is kind of a big problem. Many 3rd parties require https origins these days. Any work arounds?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [February 12, 2020, 3:47am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/9 "2020-02-12T03:47:08Z")

</div>

> [@Seanmclements](#):
>
> This is kind of a big problem

Are you sure about that? This thread seems specifically to be about Ionic internals, so:

> [@Seanmclements](#):
>
> Many 3rd parties require https origins these days

I’m not seeing how 3rd parties would be involved at all in how the Ionic app gets at stuff that’s baked into its bundle.

> [@Seanmclements](#):
>
> Any work arounds?

Can you describe the problem you’re actually encountering? If it doesn’t have to do with stuff that’s bundled with the app, maybe a new thread would be a better choice than this one.

---

<div class="post-metadata">

**Author:** ![Seanmclements](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Seanmclements](https://forum.ionicframework.com/u/Seanmclements)\
**Post date:** [February 17, 2020, 4:29am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/10 "2020-02-17T04:29:18Z")

</div>

Perhaps my issue is a lack of understanding, or documentation. Please help clarify for me.

So if the app itself is running the webview without https/ssl -does it still communicate with outside APIs securely?

Last question, the third-party example was a reference to Stripe payments. Their frontend JS library embeds some payment UI controls, and insists that the site it’s embedded in is using https. This seems like if would be effected by the http webview, is that not right?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [February 17, 2020, 8:30pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/11 "2020-02-17T20:30:07Z")

</div>

> [@Seanmclements](#):
>
> So if the app itself is running the webview without https/ssl -does it still communicate with outside APIs securely?

Yes, as long as you’re passing `https:` URLs to libraries that fire off XHRs (such as Angular `HttpClient`).

> [@Seanmclements](#):
>
> Last question, the third-party example was a reference to Stripe payments. Their frontend JS library embeds some payment UI controls, and insists that the site it’s embedded in is using https. This seems like if would be effected by the http webview, is that not right?

I’ve used Stripe, and I’ve written Ionic apps, but haven’t yet done the two together. [This cordova plugin](https://github.com/zyra/cordova-plugin-stripe) claims to be able to interact with Stripe in Ionic apps (and there’s [an Ionic Native shim](https://ionicframework.com/docs/native/stripe)). I would think that if you had to jump through any additional hoops to get that to work, it would be documented there.

---

<div class="post-metadata">

**Author:** ![mikeyyyzhao](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mikeyyyzhao](https://forum.ionicframework.com/u/mikeyyyzhao)\
**Post date:** [December 16, 2020, 12:55am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/12 "2020-12-16T00:55:59Z")

</div>

Is there a way to run webview with http? Google auth right now does not support anything other than http and https for Authorized redirect URIs

---

<div class="post-metadata">

**Author:** ![ciccilleju](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ciccilleju/32/135142_2.png) [@ciccilleju](https://forum.ionicframework.com/u/ciccilleju)\
**Post date:** [January 29, 2021, 2:39pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/13 "2021-01-29T14:39:19Z")

</div>

> [@jcesarmobile](#):
>
> on iOS you can’t use https, that should default to capacitor://

I’m having a similar issue:  
I’m using an Iframe which gives me back the following error:  
Refused to display ‘[https://www.liveincam.com/](https://www.liveincam.com/)’ in a frame because it set ‘X-Frame-Options’ to ‘SAMEORIGIN’.

they say it’s because the protocol is capacitor:// and they are expecting a request over https.

there is anything i can do for fixing it?

while it works perfectly on android (it gives me https as protocol) i’m stuck with iOS

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/b/2/b2e2d5f16b2f57709870dfcf4f30f8ed3cf6ac6c.jpeg)

thanks!

---

<div class="post-metadata">

**Author:** ![wekas](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/wekas/32/124745_2.png) [@wekas](https://forum.ionicframework.com/u/wekas)\
**Post date:** [May 8, 2021, 11:58pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/14 "2021-05-08T23:58:04Z")

</div>

I am struggling to find a way to implement apple pay because of the same issue.  
It needs to come from https.  
[https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites](https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites)

Did anyone find a way around this?  
Seems like it can potentially be an issue with many third party API’s.

---

<div class="post-metadata">

**Author:** ![Faraon](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@Faraon](https://forum.ionicframework.com/u/Faraon)\
**Post date:** [May 25, 2021, 3:01pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/15 "2021-05-25T15:01:56Z")

</div>

Im having same problem with Accept.js payment integration. In Android works fine using shceme https. In ios is not posible to use https, is httpsionic instead, but Accepts.js does not recognize that as htpps and return error

---

<div class="post-metadata">

**Author:** ![priyansh360](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@priyansh360](https://forum.ionicframework.com/u/priyansh360)\
**Post date:** [June 22, 2021, 9:15am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/16 "2021-06-22T09:15:49Z")

</div>

> [@Mmadzharov](#):
>
> “hostname”: “localhost:3000”,  
> “iosScheme”: “https”,  
> “androidScheme”: “https”

> I want to change protocol from capacitor:// to “http://” or “https://”. as i want to use Service worker in Capacitor iOS app & it only works with HTTP or HTTPS.  
> Please suggest me any way to do that

---

<div class="post-metadata">

**Author:** ![softwaredeveloptam](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@softwaredeveloptam](https://forum.ionicframework.com/u/softwaredeveloptam)\
**Post date:** [July 6, 2021, 2:35am UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/17 "2021-07-06T02:35:44Z")

</div>

I’m also looking for a way to replace the iosScheme to include https… it would be great if we could do this

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [July 7, 2021, 6:00pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/18 "2021-07-07T18:00:23Z")

</div>

In case it’s still not clear, this is NOT possible, it’s an Apple limitation, they don’t allow to use an scheme that the WKWebView already handles, such as http, https, file, and a few others (undocumented)

---

<div class="post-metadata">

**Author:** ![priyansh360](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@priyansh360](https://forum.ionicframework.com/u/priyansh360)\
**Post date:** [July 8, 2021, 1:05pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/19 "2021-07-08T13:05:12Z")

</div>

It is not possible in iOS.  
Got reply in one of my github issue

---

<div class="post-metadata">

**Author:** ![ciccilleju](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ciccilleju/32/135142_2.png) [@ciccilleju](https://forum.ionicframework.com/u/ciccilleju)\
**Post date:** [December 26, 2021, 4:45pm UTC](https://forum.ionicframework.com/t/run-webview-with-https/172315/20 "2021-12-26T16:45:27Z")

</div>

i’m using apple pay and google pay with the capacitor stripe plugin, it works perfectly.

[Next page](https://forum.ionicframework.com/t/run-webview-with-https/172315.md?page=2)
