Ionic-app-scripts: Feature request: add an option for local server to be https

Created on 22 Nov 2016  路  15Comments  路  Source: ionic-team/ionic-app-scripts

Hello,

When using proxy option, it allows to redirect https requests (http->https). The browser receives cookies from with responses, but for browser all the following requests are with http (http://localhost:8100) and thus the browser do not attach cookies to following requests. Even though we are using https as proxy.

Could you add possibility to run localhost server over https? Thus cookies will be attached to https and we can have normal work with cookies.

PS: certificates, keys and others are not important for localhost debugging. For example, currently ionic scripts depends on 'proxy-middleware' and they have inside tests these files freely laying: https://github.com/andrewrk/node-proxy-middleware/tree/master/test

BR,
Andrey.

Most helpful comment

We will be rolling this out soon, stay tuned

All 15 comments

Just some addition: one workaround, but normally not so good as it requires to run one more proxy by hand https://github.com/driftyco/ionic/issues/1686

Found this one: https://github.com/driftyco/ionic-native/issues/683
@mlynch mentions that ionic serve needs to support https and it is a separate issue? is there an issue open?

馃憤 ionic run could use this as well otherwise you can't develop with livereload when using 'powerful' html5 APIs:
https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins

As for the workaround I created the self signed cert and proxy as described in the other issue but it's unclear how to convince ionic run to tell the app to connect through that (and possibly trust the cert). Any tips would be appreciated.

Any update on this? This is critical to test Service workers, Geolocalization or Web Notifications in browser.

We're talking about this right now. Agreed it's a must-have given the changes coming/already here to web APIs on non-secure origins. No specific timeline yet but shouldn't take long

hey guys,
any news on this ?
debugging geolocation and such is pretty tedious without proper chrome remote debugging 馃槾

We will be rolling this out soon, stay tuned

Hi, have you any schedule for this? Thanks!

Any news yet?

Is there a targeted release for this feature? Also, do you need any help with anything on this? I'd be more than willing to pitch in if needed. Just let me know.

@mlynch
I have a working code-change and would be happy to make a PR if that's welcome. I just want to discuss with one of the team members to make sure I'm adding the env vars etc. according to the preferred specs.

Following https://github.com/ionic-team/ionic-cli/issues/415, I get cookies to attach by modifyng http-server.js to add

opts.cookieRewrite = proxy.proxyUrl;

after

opts.rejectUnauthorized = !(proxy.rejectUnauthorized === false);

@mlynch - https://github.com/ionic-team/ionic-app-scripts/issues/454#issuecomment-291187749 - Any word on this rollout? Has it happened? I can't find any info. It's making debugging anything geo related on Android extremely painful.

-Did you know you can live-reload changes from your app with --livereload?
-Not with geo features :(

Geo, WebRTC, etc. It's been already a while since I abandoned local development and work only with a physical device.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hermitdemschoenenleben picture hermitdemschoenenleben  路  3Comments

brandyscarney picture brandyscarney  路  4Comments

jgw96 picture jgw96  路  3Comments

nalkon picture nalkon  路  4Comments

dbarrecoquel picture dbarrecoquel  路  3Comments