-
Install
local-ssl-proxy
:npm install local-ssl-proxy
-
Start
local-ssl-proxy
on port 443:sudo local-ssl-proxy --source 443 --target 80
-
Set API to point to HTTPS by changing
.env
:API_URL=https://localhost/api
-
Start HTTP client on port 80 (edit .env to set PORT=80)
sudo npm start
-
You must visit the secure endpoint in your browser and accept the self-signed certificate. In Chrome, visit https://localhost/, click "ADVANCED" and then "Proceed to localhost (unsafe)".
-
Then the HTTP endpoint at http://localhost/ will be able to make Ajax requests through the HTTPS proxy.
Last active
July 1, 2018 08:10
-
-
Save andrewn/953ffd5cb17ac2634dc969fc7bdaff3f to your computer and use it in GitHub Desktop.
Testing SSL (self-signed cert)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi - I found that I needed to install
local-ssl-proxy
globally (not as a local package) for this to work.