Module referer_control_wm

Only send Referer header if coming from the same domain - web module

The Referer HTTP header is sent automatically to websites to inform them of the referring website; i.e. the website that you were just on. This allows website owners to see where web traffic is coming from, but can also be a privacy concern.

To help mitigate this concern, this module prevents this information from being sent whenever you navigate between two different domains. For example, if you navigate from https://example.com/test/ to https://google.com, no Referer hreader will be sent. If you navigate from https://example.com/test/ to https://example.com/, however, the Referer header will be sent. This is because some websites depend on this functionality.

Note: the word 'referer' is intentionally misspelled for historic reasons.

Usage

As this is a web module, it will not function if loaded on the main UI Lua process through require(). Instead, it should be loaded with require_web_module():

require_web_module("referer_control_wm")

Attribution

Copyright