mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 08:10:07 +01:00
Merge branch 'master' into tld-alias-for-domain-command
This commit is contained in:
16
server.php
16
server.php
@@ -35,6 +35,20 @@ function valet_support_wildcard_dns($domain)
|
||||
return $domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $config Valet configuration array
|
||||
*
|
||||
* @return string|null If set, default site path for uncaught urls
|
||||
* */
|
||||
function valet_default_site_path($config)
|
||||
{
|
||||
if (isset($config['default']) && is_string($config['default']) && is_dir($config['default'])) {
|
||||
return $config['default'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Valet configuration.
|
||||
*/
|
||||
@@ -77,7 +91,7 @@ function valet_support_wildcard_dns($domain)
|
||||
}
|
||||
}
|
||||
|
||||
if (is_null($valetSitePath)) {
|
||||
if (is_null($valetSitePath) && is_null($valetSitePath = valet_default_site_path($valetConfig))) {
|
||||
show_valet_404();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user