fix(nx): detection on server
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/merge
parent
59ec7119ea
commit
133d167f1a
|
@ -370,11 +370,8 @@ class Util
|
||||||
public static function callerIsNative(): bool
|
public static function callerIsNative(): bool
|
||||||
{
|
{
|
||||||
// Should not use IRequest here since this method is called during registration
|
// Should not use IRequest here since this method is called during registration
|
||||||
if (\array_key_exists('HTTP_X_REQUESTED_WITH', $_SERVER)) {
|
return 'gallery.memories' === ($_SERVER['HTTP_X_REQUESTED_WITH'] ?? '')
|
||||||
return 'gallery.memories' === $_SERVER['HTTP_X_REQUESTED_WITH'];
|
|| str_contains($_SERVER['HTTP_USER_AGENT'] ?? '', 'MemoriesNative');
|
||||||
}
|
|
||||||
|
|
||||||
return str_contains($_SERVER['HTTP_USER_AGENT'] ?? '', 'MemoriesNative');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue