Skip to content

Commit

Permalink
Replacing hardcoded protocol in mix helper (#18943)
Browse files Browse the repository at this point in the history
* Replacing hardcoded protocol in mix helper

This does not solve "the whole problem" however currently the mix helper hardcodes the port and protocol.

When using SSL on your development environment browsers refuse to load the assets served by mix when using HMR over http

This change makes sure it uses the correct protocol.

Although it doesn't solve the issue of users not having SSL on "localhost"

* Code styling changes

* simplified :)

* Update helpers.php
  • Loading branch information
OwenMelbz authored and taylorotwell committed Apr 26, 2017
1 parent a1a443a commit 9100b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ function mix($path, $manifestDirectory = '')
}

if (file_exists(public_path($manifestDirectory.'/hot'))) {
return new HtmlString("http://localhost:8080{$path}");
return new HtmlString("//localhost:8080{$path}");
}

if (! $manifest) {
Expand Down

0 comments on commit 9100b42

Please sign in to comment.