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

Provide own SSL certificates in development #3603

Closed
gmarty opened this issue Dec 15, 2017 · 1 comment
Closed

Provide own SSL certificates in development #3603

gmarty opened this issue Dec 15, 2017 · 1 comment

Comments

@gmarty
Copy link

gmarty commented Dec 15, 2017

We have a very specific need that forces us to use our own generated SSL certificates in development.

I can't see any obvious ways to provide certificates with react-dev-utils/webpackHotDevClient, but the default webpack-dev-server server has a https option that does exactly this.

Is there an easy way to achieve it?
How common is this problem? Is it something that is commonly required?

@tharakawj
Copy link
Contributor

tharakawj commented Dec 16, 2017

Yes. You can set HTTPS=true environment variable and it will exactly enable the https option in webpack dev server which you have mentioned above. After setting it, npm start will open your site in https. However, your browser might not accept the self-signed certificate and give you an error. In that case, you have to manually trust it as a valid certificate. As an example, if you use Chrome in OSX you can follow this guide to trust your self-signed SSL certificate.

@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants