-
Notifications
You must be signed in to change notification settings - Fork 808
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
laravel mix function has no secure option #744
Comments
Just hit the same issue this morning |
After more investigation, with the hope to add a simple PR, the problem seems much deeper. As you said @kasperpeulen theres lots of hardcoded things that make it unusable in many circumstances. For example on OSX theres port range restrictions for non-sudo. Meaning that users who have got port 8080 forward to 80 to be able to serve websites without sudo access cant use it either. So issues I've spotted are Laravel itself has some issues in if (file_exists(public_path($manifestDirectory.'/hot'))) {
$hotProtocol = request()->secure() ? 'https' : 'http';
return new HtmlString("{$hotProtocol}://localhost:8080{$path}");
} Which I've submitted a PR for laravel/framework#18943 To enable SSL on HMR without using a fluent method you can do mix.webpackConfig({
devServer: {
https: true,
port: 9999
}
}); However the laravel helper does not respect the properties defined here - I think the @JeffreyWay does this seem like a possibility? |
Another update Just noticed 6 days ago there were some https bits added c74d71d |
I think your PR would do the trick, I override the mix helper function, like you suggested, and now everything works here. Thanks @OwenMelbz |
Looks like that mix PR got merged. Thanks so much. |
So I use this mix function:
But it always points to http://localhost:8080/js/app.js. But I'm using
valet secure
in combination with the following npm hot command:The http url seems to be hardcoded:
Maybe add an secure option?
The text was updated successfully, but these errors were encountered: