From 1d4f4b92de5e74582f0168a8d6d29d9b8c4715fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Rodr=C3=ADguez=20Guimer=C3=A1ns?= Date: Sun, 5 Mar 2023 17:17:48 +0100 Subject: [PATCH] Include path in the expected URL during Pre-Flight So that the message displayed to the user when the URL Pre-Flight check fails is: > Snipe-IT thinks your URL is SCHEME://DOMAIN, but your real URL is SCHEME://DOMAIN/setup instead of: > Snipe-IT thinks your URL is SCHEME://DOMAIN/setup, but your real URL is SCHEME://DOMAIN/setup Having a missing "/setup" in the expected URL might confuse the user into thinking that it is an additional configuration problem they need to fix. With this change, the comparison between the expected and actual URL will not contain any accidental difference anymore. Only those that the user really needs to be aware of and fix in their setup. --- app/Http/Controllers/SettingsController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 5498187561..407788a61b 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -74,9 +74,8 @@ class SettingsController extends Controller } $pageURL = $protocol.$host.$_SERVER['REQUEST_URI']; - $start_settings['url_valid'] = (url('/').'/setup' === $pageURL); - - $start_settings['url_config'] = url('/'); + $start_settings['url_config'] = url('/').'/setup'; + $start_settings['url_valid'] = ($start_settings['url_config'] === $pageURL); $start_settings['real_url'] = $pageURL; $start_settings['php_version_min'] = true;