mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
finish support with otane
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user