修复,api接口为相对地址访问,解决http无法访问https资源或api接口,报错异常。
vendor/flarum/core/src/Api/Serializer/ForumSerializer.php
Line:70行
/**
* {@inheritdoc}
*/
protected function getDefaultAttributes($model)
{
$attributes = [
'title' => $this->settings->get('forum_title'),
'description' => $this->settings->get('forum_description'),
'showLanguageSelector' => (bool)$this->settings->get('show_language_selector'),
'baseUrl' => $url = $this->app->url(),
'basePath' => parse_url($url, PHP_URL_PATH) ?: '',
'debug' => $this->app->inDebugMode(),
// 'apiUrl' => $this->app->url('api'),
//modify by symo
'apiUrl' =>'/api',