feat: replace exploded base_* with public_url

Fixes #1574

BREAKING CHANGE: The `general` section in the config schema has changed: the `general.base_*`, `general.protocol` and `general.force_ssl` configuration fields have been replaced with a single `general.public_url` field. Be sure to use a valid url with the new configuration field.
This commit is contained in:
jo 2022-04-17 14:38:49 +02:00 committed by Kyle Robbertze
parent d020fbd983
commit 751d430bcc
13 changed files with 297 additions and 144 deletions

View file

@ -17,8 +17,7 @@ class GeneralSetup extends Setup
protected static $_properties;
// Constant form field names for passing errors back to the front-end
public const GENERAL_PORT = 'generalPort';
public const GENERAL_HOST = 'generalHost';
public const PUBLIC_URL = 'publicUrl';
public const CORS_URL = 'corsUrl';
public static $cors_url;
@ -31,8 +30,7 @@ class GeneralSetup extends Setup
{
self::$_properties = [
'api_key' => $this->generateRandomString(),
'base_url' => $settings[self::GENERAL_HOST],
'base_port' => $settings[self::GENERAL_PORT],
'public_url' => $settings[self::PUBLIC_URL],
'cors_url' => $settings[self::CORS_URL],
];
self::$cors_url = $settings[self::CORS_URL];