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

Look for certificates in valet linux config directory #307

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

jameshulse
Copy link
Contributor

Hi, this pull request adds another search path to support the valet-linux project.

I understand that this project isn't officially supported, but a small change in this Vite plugin would allow our team to greatly simplify our Vite configuration and support developers using Linux or Mac with Herd.

Comment on lines +221 to 223
if (resolvedConfig.server.https.key.startsWith(valetMacConfigPath()) || resolvedConfig.server.https.key.startsWith(valetLinuxConfigPath())) {
server.config.logger.info(` ${colors.green('➜')} Using Valet certificate to secure Vite.`)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jameshulse, I've just made this change to ensure the Linux version also sees the log message in the Vite server output. Could you confirm that is working as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sure do:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@timacdonald timacdonald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

I've renamed the first-party valet function to valetMac. This is to make it easier to understand what is going on with both functions and also aligns with herdMac / herdWindows.

Although you could say that we want to keep the first-party method as just valet, it makes it easier to know there is another version to also check when working with the code.

@jameshulse
Copy link
Contributor Author

Good shout. Cheers for that Tim.

Shameless plug: if the team are looking for more early Laravel Cloud adopters, we are keen to get off self hosting by the end of the year.

@taylorotwell taylorotwell merged commit 5a9cf20 into laravel:1.x Nov 11, 2024
3 checks passed
@taylorotwell
Copy link
Member

Thanks @jameshulse!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants