-
Notifications
You must be signed in to change notification settings - Fork 154
[0.6.x] Add config option to utilise Valet TLS certificates #129
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
Conversation
4fb4296
to
8e0eb21
Compare
Looks good! I note that Vite has introduced a separate plugin for SSL (https://github.com/vitejs/vite-plugin-basic-ssl) but I like this option for Valet users so they don't need to install anything additional. I wonder whether we should document https://github.com/vitejs/vite-plugin-basic-ssl for non-Valet users? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works a treat! 🚢
@jessarcher @timacdonald think @taylorotwell is not going to review this, right? Can you merge this yourself? |
This PR introduces a new
valetTls
configuration option to allow developers to use Valet generated certificates on their Mac. This is useful as Vite 3 no longer generates a self signed certificate. Valet also puts certificates into the system keychain, so if you are using Chromium or Safari the experience is seamless.Unfortunately Firefox does not seem to read from the system keychain, so you may still need to additionally accept the Valet certificate for the Vite server, as we currently have to.
When setting the configuration option to
true
, the plugin will automatically detect the host by checking the current directory name and appending the configured Valet TLD:If you have linked you site via a different host, that is if you are in the
my-app
directory and ran:so that you can view "my-app" by visiting https://my-host.test, then you should specify the host along with the TLD in the
valetTls
option:User config will always take precedence over the underlying generated Valet config.
Documentation PR: laravel/docs#8164