finish support with otane

This commit is contained in:
xiaomlove
2022-03-20 22:14:00 +08:00
parent a5ea51de55
commit 0e4544459f
39 changed files with 427 additions and 104 deletions

View File

@@ -17,11 +17,10 @@ class Platform
*/
public function handle(Request $request, Closure $next)
{
do_log(nexus_json_encode($_SERVER));
if (empty(CURRENT_PLATFORM)) {
if (empty(nexus()->getPlatform())) {
throw new \InvalidArgumentException("Require platform header.");
}
if (!in_array(CURRENT_PLATFORM, PLATFORMS)) {
if (!nexus()->isPlatformValid()) {
throw new \InvalidArgumentException("Invalid platform: " . CURRENT_PLATFORM);
}
return $next($request);