We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94e961c commit ba1776fCopy full SHA for ba1776f
src/Actions/AssetFileLocator.php
@@ -4,18 +4,22 @@
4
5
namespace Hyde\RealtimeCompiler\Actions;
6
7
+use Illuminate\Support\Str;
8
+
9
/**
10
* Locate a static file to proxy.
11
*/
12
class AssetFileLocator
13
{
14
public static function find(string $path): ?string
15
16
+ $path = trim($path, '/');
17
18
$strategies = [
- BASE_PATH.'/_site'.$path,
- BASE_PATH.'/_media'.$path,
- BASE_PATH.'/_site'.basename($path),
- BASE_PATH.'/_media/'.basename($path),
19
+ BASE_PATH.'/_site/'.$path,
20
+ BASE_PATH.'/_media/'.$path,
21
+ BASE_PATH.'/_site/'.Str::after($path, 'media/'),
22
+ BASE_PATH.'/_media/'.Str::after($path, 'media/'),
23
];
24
25
foreach ($strategies as $strategy) {
0 commit comments