X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/903895814ace77cd30c22b57de16f9e22daf21e4..refs/pull/5685/head:/app/Util/SsrUrlValidator.php diff --git a/app/Util/SsrUrlValidator.php b/app/Util/SsrUrlValidator.php index 0b3a6a31d..076a653fc 100644 --- a/app/Util/SsrUrlValidator.php +++ b/app/Util/SsrUrlValidator.php @@ -4,11 +4,16 @@ namespace BookStack\Util; use BookStack\Exceptions\HttpFetchException; +/** + * Validate the host we're connecting to when making a server-side-request. + * Will use the given hosts config if given during construction otherwise + * will look to the app configured config. + */ class SsrUrlValidator { protected string $config; - public function __construct(string $config = null) + public function __construct(?string $config = null) { $this->config = $config ?? config('app.ssr_hosts') ?? ''; }