JavaScript Restrictor
Browser extension that improves privacy and security
http_shield_firefox.js File Reference

This file contains Firefox-specific functions for Network Boundary Shield. More...

Functions

function async beforeSendHeadersListener (requestDetail)
 

Detailed Description

This file contains Firefox-specific functions for Network Boundary Shield.

This file contains Firefox specific functions for Network Boundary Shield.

Author
Copyright (C) 2020 Pavel Pohner
Copyright (C) 2020-2021 Martin Bednář
License:
SPDX-License-Identifier: GPL-3.0-or-later

This file contains webRequest API listeners. These listeners handle HTTP requests in the "before send headers" phase and handle messages (on message event).

NBS for Firefox uses the DNS web extension API to resolve domain names. As the domain names are cached and needs to be resolved without NBS, the performance impact should be negligible.

Function Documentation

◆ beforeSendHeadersListener()

function async beforeSendHeadersListener (   requestDetail)

The event listener, hooked up to webRequest onBeforeSendHeaders event. Receives detail of HTTP request in requestDetail. Catches the request, analyzes its origin and target URLs and blocks it/permits it based on their IP adresses. Requests coming from public IP ranges targeting the private IPs are blocked by default. Others are permitted by default.

Parameters
requestDetailDetails of HTTP request.
Here is the call graph for this function:
Here is the caller graph for this function: