You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BiliRoaming-PHP-Server/utils/lock_area.php

24 lines
675 B
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
// 防止外部破解
if(!defined('SYSTEM')) {exit();}
// 锁区、web接口、X-From-Biliroaming
if ($cache_type == "app"){
if ($type == 1 && LOCK_AREA == 1 && !empty($SERVER_AREA) && !in_array(AREA, $SERVER_AREA)) {
$baned = 30;
block($baned); // 判断服务器锁区
}
if (BILIROAMING_VERSION == "" && BILIROAMING == 1) {
if (WEB_ON == 1 && $path == "/intl/gateway/v2/ogv/view/app/season"){
// web接口会用到东南亚season特殊放行
} else {
$baned = 31;
block($baned); // 没带上 X-From-Biliroaming 的请求头
}
}
} elseif ($cache_type == "web" && WEB_ON == 0) {
$baned = 32;
block($baned); // 服务器不开web接口
}
?>