By default, don't rewrite API base URL

This commit is contained in:
Franz Liedke 2015-08-26 23:43:33 +02:00
parent 342f797d80
commit 6e52762b7a
3 changed files with 3 additions and 3 deletions

View File

@ -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)));

View File

@ -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',

View File

@ -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',