修正 Proxied、 SSL/TLS 设为 Flexible、开启 Always Use HTTPS
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use app\admin\model\split\Link;
|
||||
|
||||
/**
|
||||
* 分流链接随机打乱配置读取
|
||||
*/
|
||||
class SplitNumberWeighService
|
||||
{
|
||||
/**
|
||||
* 链接是否开启随机打乱(新号码按随机插入顺序写入,跳转按 id 顺序轮转)
|
||||
*/
|
||||
public static function isRandomShuffleEnabled(int $linkId): bool
|
||||
{
|
||||
if ($linkId <= 0) {
|
||||
return false;
|
||||
}
|
||||
return (int) Link::where('id', $linkId)->value('random_shuffle') === 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user