mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 22:53:37 +08:00
By default, don't rewrite API base URL
This commit is contained in:
parent
342f797d80
commit
6e52762b7a
|
@ -72,7 +72,7 @@ class InstallAction extends Action
|
||||||
$baseUrl = rtrim((string) $request->getAttribute('originalUri'), '/');
|
$baseUrl = rtrim((string) $request->getAttribute('originalUri'), '/');
|
||||||
|
|
||||||
$data->setSetting('admin_url', $baseUrl . '/admin');
|
$data->setSetting('admin_url', $baseUrl . '/admin');
|
||||||
$data->setSetting('api_url', $baseUrl . '/api');
|
$data->setSetting('api_url', $baseUrl . '/api.php');
|
||||||
$data->setSetting('base_url', $baseUrl);
|
$data->setSetting('base_url', $baseUrl);
|
||||||
$data->setSetting('forum_title', array_get($input, 'forumTitle'));
|
$data->setSetting('forum_title', array_get($input, 'forumTitle'));
|
||||||
$data->setSetting('mail_from', 'noreply@' . preg_replace('/^www\./i', '', parse_url($baseUrl, PHP_URL_HOST)));
|
$data->setSetting('mail_from', 'noreply@' . preg_replace('/^www\./i', '', parse_url($baseUrl, PHP_URL_HOST)));
|
||||||
|
|
|
@ -63,7 +63,7 @@ class DataFromUser implements ProvidesData
|
||||||
'allow_post_editing' => 'reply',
|
'allow_post_editing' => 'reply',
|
||||||
'allow_renaming' => '10',
|
'allow_renaming' => '10',
|
||||||
'allow_sign_up' => '1',
|
'allow_sign_up' => '1',
|
||||||
'api_url' => $baseUrl . '/api',
|
'api_url' => $baseUrl . '/api.php',
|
||||||
'base_url' => $baseUrl,
|
'base_url' => $baseUrl,
|
||||||
'custom_less' => '',
|
'custom_less' => '',
|
||||||
'default_locale' => 'en',
|
'default_locale' => 'en',
|
||||||
|
|
|
@ -32,7 +32,7 @@ class DefaultData implements ProvidesData
|
||||||
'allow_post_editing' => 'reply',
|
'allow_post_editing' => 'reply',
|
||||||
'allow_renaming' => '10',
|
'allow_renaming' => '10',
|
||||||
'allow_sign_up' => '1',
|
'allow_sign_up' => '1',
|
||||||
'api_url' => 'http://flarum.dev/api',
|
'api_url' => 'http://flarum.dev/api.php',
|
||||||
'base_url' => 'http://flarum.dev',
|
'base_url' => 'http://flarum.dev',
|
||||||
'custom_less' => '',
|
'custom_less' => '',
|
||||||
'default_locale' => 'en',
|
'default_locale' => 'en',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user