Open jakeNiemiec opened 8 years ago
@jakeNiemiec I see you're on MacOS. A workaround may be to add the localhost cert to your keychain.
The next time you open your site, it should accept it as a valid certificate. 🔒
@JodiWarren the localhost cert works fine. However, you cannot request subdomains when using the localhost method.
👉 Specifically I want to be able to access https://api.mylocalwebsite.me:3000
, the best it seems browsersync can give me is https://localhost:3000
, not allowing me to make requests via the subdomain, only the root domain.
Like I said above there seems to be an option to specify a custom certificate (which I have), but it does not work.
@jakeNiemiec running Browsersync instances are per-domain, so although what you are suggesting would be a great feature, it doesn't quite align with how the internals currently work.
@jakeNiemiec especially since you are setting the 'host' to one domain, and then expecting Browsersync to pick up requests on another
@shakyShane Are you saying that I should be able to use "proxy": https://api.website.me:3000
to access the subdomain through https://localhost:3000
? I'll take a second look at this a bit later and see if i can't get it working.
Thanks for getting to this, great work on BS so far!
Issue details
Proxying server with https causes NET::ERR_CERT_COMMON_NAME_INVALID (Chrome).
When you proxy a server, the servers certificate is not provided, instead it uses incorrectly provides a certificate for localhost (see below).
Normally localhost would be fine, however, being able to access subdomains is critical for my current use-case.
I currently have /etc/hosts forwarding
website.me
to 127.0.0.1 along with the specific subdomains needed. I point the browser-sync proxy tohttps://www.website.me:3000
(the locally run, ssl enabled, dev server), set the host and port tohttps://www.website.me:8081
.Ideally browser-sync would a. serve the cert that
https://www.website.me:3000
serves; or b. allow me to specify a certificate via thehttps
config option , e.g.:Steps to reproduce/test case
https://www.website.me:3000
(a ssl enabled server),https://www.website.me:8081
.Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync