I'm trying to create URL inspector using Firefox native messages. The problem is, when native application sends a verdict, onBeforeRequest listener already released request, thus redirection doesn't happen.
Can you please help to make my extension wait for reply for up to 2 seconds and redirect the request if answer is "0"?

```
var port = browser.runtime.connectNative("ping_pong");

function inspectURL(requestDetails) {
    console.log("Loading: <" + requestDetails.url + ">");
    port.postMessage(requestDetails.url);
    console.log("Posting complete <" + requestDetails.url + ">");
}

port.onMessage.addListener((response) = > {
    console.log("Received: <" + response + ">");
    if (response == "1")
    {
        console.log("Good url!!!");
    }
    else
    {
        console.log("BAD url - redirecting!!!");
        return {
        redirectUrl: "https://38.media.tumblr.com/tumblr_ldbj01lZiP1qe0eclo1_500.gif"
        };
    }
});

browser.webRequest.onBeforeRequest.addListener(
    inspectURL,
    { urls: ["<all_urls>"] },
    ["blocking"]
);

```