Browsersync + Laravel Valet Secure
See original GitHub issueIm using browser-sync to serve up my local dev sites. Im also using Laravel Valet. When I use valet secure
to serve a dev site over https, Im getting those ugly Chrome Privacy Error pages. Is there a way to stop this?
My browser-sync config is as follows:
browserSync.init({
host: "https://mysite.dev",
proxy: "https://mysite.dev",
...
mysite.dev
changes from site to site, I have a lot of local dev sites Im working on.
When I run npm start
browser-sync outputs this:
[BS] Proxying: https://mysite.dev
[BS] Access URLs:
------------------------------------------
Local: https://localhost:3000
External: https://https://mysite.dev:3000
------------------------------------------
UI: http://localhost:3001
UI External: http://https:3001
As you can see its correctly mapping the URL, and if I ignore Chromes privacy error warnings I can see the website fine. Im just wondering why the https is not working properly.
If I access https://mysite.dev
without browser-syncs :3000
port, it works fine in Chrome, and says “Secure” on the address bar
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:14 (1 by maintainers)
Top Results From Across the Web
How to use Browsersync with Laravel Valet (2021) | RJS
Browsersync is a tool to make developing easier. It offers handy tools, of which the most important is automatic browser reloading on file ......
Read more >Laravel Valet not playing nice with BrowserSync - Laracasts
I was having issues getting BrowserSync to play nice with Valet (Caddy server) using HTTPS. Chrome couldn't verify the certificate to the proxy...
Read more >Browser-sync and Valet Secure - node.js - Stack Overflow
Im using browser-sync to serve up my local dev sites. Im also using Laravel Valet. When I use valet secure to serve a...
Read more >BrowserSync in Laravel Valet - Sridhar Katakam
BrowserSync in Laravel Valet · Lightweight, super fast, feels native as if part of the OS · Always-on sites with nothing to start/stop...
Read more >How to setup a Craft CMS project with Laravel Mix (and Vue.js)
MacOS; Laravel Valet (installation instructions) ... valet secure tutorial ... Tailwind CSS (JIT) (compiled from SASS); VueJS support; BrowserSync support.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you’re using
valet secure
and want browserSync play nicely with your test domain, here is a snippet which will make it secure without any errors:This will load “https://yourdomain.test:3000” with valid certificates.
Maybe this helps someone stumbling across this. 😃
Maybe it has to do with the version of Valet but on my setup (v 2.8.0) the location of the cert and key files is different. Works like a charm though! Goodbye SSL for friggin’ localhost!
https: { key: homedir + '/.config/valet/Certificates/' + domain + '.key', cert: homedir + '/.config/valet/Certificates/' + domain + '.crt', },