Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support serve browser platform locally over https #2282

Closed
jgw96 opened this issue May 15, 2017 · 5 comments
Closed

Support serve browser platform locally over https #2282

jgw96 opened this issue May 15, 2017 · 5 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented May 15, 2017

From @padgettrowell on May 15, 2017 13:13

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x ] 3.x

I'm submitting a ... (check one with "x")
[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

Ionic does not currently support serving locally over https when targeting the browser platform.

Expected behavior:

Being able to serve an Ionic project locally over https allow for real world testing of applications targeting the browser platform. For example, testing CSP policies. For example, it's not possible to locally test the following policy:
Content-Security-Policy: upgrade-insecure-requests

Steps to reproduce:

In your index.html file, add the following element:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

All content fails to load.

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here

Copied from original issue: ionic-team/ionic-framework#11674

@janpio
Copy link
Contributor

janpio commented May 15, 2017

Hm, as a curious bystander here @padgettrowell:
What kind of certificate would that require to be served?

@imhoffd
Copy link
Contributor

imhoffd commented May 15, 2017

@padgettrowell Can you use haproxy?

@padgettrowell
Copy link

@piotrowski I'm only thinking about the development process, so a self signed certificate for localhost would suffice.

@padgettrowell
Copy link

@dwieeb I could use a proxy, but it's a short term solution to what I think is a larger problem.

With Ionic2+ supporting the browser as a first class platform, I think an out of the box solution to serving HTTPS locally would be beneficial. I get this hasn’t been an issue to date, as mobile platforms serve from disk on the local device, so (local) HTTPS isn’t an issue.

With the browser platform, it’s really important to be able to serve and test your application locally over https. As a developer, I want to test things like CSP policies, HSTS, HTTP/S redirects on my local machine, before deploying to a server. Being able to do this via the Ionic CLI (and not needing to setup a proxy) would be great.

@imhoffd
Copy link
Contributor

imhoffd commented May 17, 2017

Consolidating to #2312

@imhoffd imhoffd closed this as completed May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants