Fix Surge Subscribing issue

This commit is contained in:
Snorlax 2021-12-11 21:24:27 +08:00
parent 32c539d2c0
commit ecfb9ce8b0

View File

@ -52,8 +52,8 @@ class Surge
}
// Subscription link
$subsURL = config('v2board.subscribe_url', config('v2board.app_url', env('APP_URL'))) . '/api/v1/client/subscribe?token=' . $user['token'];
$subsDomain = $_SERVER['SERVER_NAME'];
$subsURL = 'https://' . $subsDomain . '/api/v1/client/subscribe?token=' . $user['token'];
$config = str_replace('$subs_link', $subsURL, $config);
$config = str_replace('$subs_domain', $subsDomain, $config);