File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,20 @@ function valet_support_wildcard_dns($domain)
3535 return $ domain ;
3636}
3737
38+ /**
39+ * @param array $config Valet configuration array
40+ *
41+ * @return string|null If set, default site path for uncaught urls
42+ * */
43+ function valet_default_site_path ($ config )
44+ {
45+ if (isset ($ config ['default ' ]) && is_string ($ config ['default ' ]) && is_dir ($ config ['default ' ])) {
46+ return $ config ['default ' ];
47+ }
48+
49+ return null ;
50+ }
51+
3852/**
3953 * Load the Valet configuration.
4054 */
@@ -77,7 +91,7 @@ function valet_support_wildcard_dns($domain)
7791 }
7892}
7993
80- if (is_null ($ valetSitePath )) {
94+ if (is_null ($ valetSitePath ) && is_null ( $ valetSitePath = valet_default_site_path ( $ valetConfig )) ) {
8195 show_valet_404 ();
8296}
8397
You can’t perform that action at this time.
0 commit comments