mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Fix incorrect return type for BlockingResponse
This commit is contained in:
@@ -513,14 +513,14 @@ async function initWhitelist () {
|
|||||||
*/
|
*/
|
||||||
async function onBeforeCastSDKRequest (details: OnBeforeRequestDetails) {
|
async function onBeforeCastSDKRequest (details: OnBeforeRequestDetails) {
|
||||||
if (!details.originUrl) {
|
if (!details.originUrl) {
|
||||||
return;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check against whitelist if restricted mode is enabled
|
// Check against whitelist if restricted mode is enabled
|
||||||
if (await options.get("userAgentWhitelistRestrictedEnabled")) {
|
if (await options.get("userAgentWhitelistRestrictedEnabled")) {
|
||||||
if (!details?.frameAncestors?.length) {
|
if (!details?.frameAncestors?.length) {
|
||||||
if (!originUrlCache.includes(details.originUrl)) {
|
if (!originUrlCache.includes(details.originUrl)) {
|
||||||
return;
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let hasMatchingAncestor = false;
|
let hasMatchingAncestor = false;
|
||||||
@@ -531,7 +531,7 @@ async function initWhitelist () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!hasMatchingAncestor) {
|
if (!hasMatchingAncestor) {
|
||||||
return;
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user