mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-11 15:10:54 +00:00
再次更改网站跳转百度逻辑 & 修改默认用户属性减少demo站的被玩坏率
This commit is contained in:
@@ -188,7 +188,7 @@ class UserController extends Controller
|
||||
|
||||
// 非演示环境才可以修改管理员密码
|
||||
$password = $request->input('password');
|
||||
if (! empty($password) && ! (env('APP_DEMO') && $user->id === 1)) {
|
||||
if (! empty($password) && ! (config('app.demo') && $user->id === 1)) {
|
||||
$data['password'] = $password;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class isForbidden
|
||||
}
|
||||
|
||||
// 拒绝通过订阅链接域名访问网站,防止网站被探测
|
||||
if (strpos(sysConfig('subscribe_domain'), $request->getHost()) !== false && strpos(sysConfig('website_url'), $request->getHost()) === false) {
|
||||
if (config('app.env') === 'production' && sysConfig('website_url') && ! str_contains(sysConfig('website_url'), $request->getHost())) {
|
||||
Log::info('识别到通过订阅链接访问,强制跳转至百度('.IP::getClientIp().')');
|
||||
|
||||
return redirect('https://www.baidu.com');
|
||||
|
||||
Reference in New Issue
Block a user