chore: fix sdk fallback back to unknown

This commit is contained in:
Chirag Aggarwal
2025-04-15 12:08:18 +00:00
parent c365480aec
commit 76c7eb14eb
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ App::init()
$sdkValidator = new WhiteList($servers, true);
$sdk = $request->getHeader('x-sdk-name', 'UNKNOWN');
if ($sdkValidator->isValid($sdk)) {
if ($sdk !== 'UNKNOWN' && $sdkValidator->isValid($sdk)) {
$sdks = $dbKey->getAttribute('sdks', []);
if (!in_array($sdk, $sdks)) {
+2 -2
View File
@@ -808,9 +808,9 @@ App::setResource('devKey', function (Request $request, Document $project, array
// add sdk to key
$sdkValidator = new WhiteList($servers, true);
$sdk = $request->getHeader('x-sdk-name', null);
$sdk = $request->getHeader('x-sdk-name', 'UNKNOWN');
if ($sdk && $sdkValidator->isValid($sdk)) {
if ($sdk !== 'UNKNOWN' && $sdkValidator->isValid($sdk)) {
$sdks = $key->getAttribute('sdks', []);
if (!in_array($sdk, $sdks)) {