ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
609 stars 300 forks source link

Feature request: add an option for local server to be https #454

Open laserus opened 7 years ago

laserus commented 7 years ago

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.

laserus commented 7 years ago

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

laserus commented 7 years ago

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?

siliconcow commented 7 years ago

👍 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.

shprink commented 7 years ago

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

mlynch commented 7 years ago

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

n0rb commented 7 years ago

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

mlynch commented 7 years ago

We will be rolling this out soon, stay tuned

sertal70 commented 7 years ago

Hi, have you any schedule for this? Thanks!

rvhelden commented 7 years ago

Any news yet?

todrules commented 7 years ago

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.

jskrzypek commented 7 years ago

@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.

Airblader commented 6 years ago

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);
keyz182 commented 6 years ago

@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.

heroInCommunity commented 6 years ago

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

EternallLight commented 6 years ago

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