Add-on to Manipulate Header Data Sent to Server

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
pale guru
Moonbather
Moonbather
Posts: 69
Joined: 2021-11-06, 11:10
Location: Tyskland

Add-on to Manipulate Header Data Sent to Server

Post by pale guru » 2025-04-08, 14:08

I remember reading about some Add-on that can manipulate Header Data before they are sent to the Server (I think it was changing User Agent). I went through the Add-ons list, but couldn't find any that would suite this.

Maybe someone can help. I like to alter header data according to a static list or regex. Thanks.
… tanning in dimmed LCD light. – Evry 1′s a beginner, baby, that's the truth…

Michaell
Lunatic
Lunatic
Posts: 384
Joined: 2018-05-26, 18:13

Re: Add-on to Manipulate Header Data Sent to Server

Post by Michaell » 2025-04-08, 18:11

Modify Headers in Classic Addons Archive is the old standard one. But it's really old. You might be better off with JustOff's Modify Http Response:
https://github.com/JustOff/modify-http- ... /tag/1.3.8
Win10home(1709), PM33.9.0.1-portable as of Sep. 24, 2025

Goodydino
Keeps coming back
Keeps coming back
Posts: 926
Joined: 2017-10-10, 21:20

Re: Add-on to Manipulate Header Data Sent to Server

Post by Goodydino » 2025-04-08, 19:04

Michaell wrote:
2025-04-08, 18:11
Modify Headers in Classic Addons Archive is the old standard one. But it's really old. You might be better off with JustOff's Modify Http Response:
https://github.com/JustOff/modify-http- ... /tag/1.3.8
There is practically no description of that at github. The name sounds as if it would modify the server's response, not the browser's request.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5689
Joined: 2015-12-09, 15:45

Re: Add-on to Manipulate Header Data Sent to Server

Post by moonbat » 2025-04-09, 00:52

Goodydino wrote:
2025-04-08, 19:04
There is practically no description of that at github.
You'll see it often mentioned here, adoxa creates rules for it for broken websites. It works great.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

BenFenner
Keeps coming back
Keeps coming back
Posts: 844
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Add-on to Manipulate Header Data Sent to Server

Post by BenFenner » 2025-04-09, 01:05

For one-off usage, the developer console can do this (no addon needed). It's a bit clunky, but comes in handy when I need it.

Michaell
Lunatic
Lunatic
Posts: 384
Joined: 2018-05-26, 18:13

Re: Add-on to Manipulate Header Data Sent to Server

Post by Michaell » 2025-04-09, 01:50

Regarding using Developer Console to modify headers, I think a lot of folks could benefit from instruction on how that is done. A tutorial topic would be good..
Win10home(1709), PM33.9.0.1-portable as of Sep. 24, 2025

User avatar
billmcct
Board Warrior
Board Warrior
Posts: 1070
Joined: 2012-09-04, 15:19
Location: Union City Georgia USA

Re: Add-on to Manipulate Header Data Sent to Server

Post by billmcct » 2025-04-09, 11:47

More info for the addon:
https://github.com/JustOff/modify-http-response

It's a fork of the original.
--------------------------------------------------------------------------------------------------------------
Dell Precision 15 7550
Windows 10 Pro. 22H2 19045.5965
Xeon W-10885M
64 GB DDR4 ECC memory (128 GB max)
2 TB Samsung 9100 Pro main M2 SSD
1 TB Intel storage M2 SSD (very very slow)
500 GB Corsair T500 storage M2 SSD (6 TB max)
Intel onboard GPU 1080p
Quadro RTX 5000 Max-Q GPU 4K

Pale Moon 33.9.x x64 AVX2 build

The difference between the Impossible and the Possible lies in a man's Determination.
Tommy Lasorda

User avatar
back2themoon
Knows the dark side
Knows the dark side
Posts: 3007
Joined: 2012-08-19, 20:32

Re: Add-on to Manipulate Header Data Sent to Server

Post by back2themoon » 2025-04-09, 13:34

There's also the newer fork of the fork (that's how I remember it anyway), "Intercept & Modify HTTP Response" by tellu_white (v.4.3 is the latest, probably - cannot be sure), but since the author refused to upload it to the Add-Ons Site it can only be found somewhere between the forum abyss and dodgy Mediafire links.

And understandably so, no one will bother looking for something that is not visible. Yet another reason for tellu_white to hopefully reconsider.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38398
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Add-on to Manipulate Header Data Sent to Server

Post by Moonchild » 2025-04-09, 15:23

The thing is, OP asked to modify the request headers, not the response headers.
I'm not entirely sure what they hope to achieve though, and no details were given.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Goodydino
Keeps coming back
Keeps coming back
Posts: 926
Joined: 2017-10-10, 21:20

Re: Add-on to Manipulate Header Data Sent to Server

Post by Goodydino » 2025-04-09, 20:08

The description says that only one filter is used per host. What if there is more than one field in the response header that you want to modify? Which one would be chosen - the first one in the header?

User avatar
adoxa
Astronaut
Astronaut
Posts: 521
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: Add-on to Manipulate Header Data Sent to Server

Post by adoxa » 2025-04-10, 00:20

pale guru wrote:
2025-04-08, 14:08
I remember reading about some Add-on that can manipulate Header Data before they are sent to the Server. ... I like to alter header data according to a static list or regex.
You may like to look at moz-rewrite.

User avatar
pale guru
Moonbather
Moonbather
Posts: 69
Joined: 2021-11-06, 11:10
Location: Tyskland

Re: Add-on to Manipulate Header Data Sent to Server

Post by pale guru » 2025-09-04, 02:10

Wonderful. Thanks. moz-rewrite is just what I'm looking for.

One usage scenario is to manipulate fingerprinting data to contain just blank response or rubbisch data.

More and more online shops are hosted in a cloud environment where clients and customers are constantly observed and 'fingerrpinted' and judged to be be 'good clients' or 'bad bots'. From my side, if they ignore Sec-GPC completely, I consider them 'bad' myself.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38398
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Add-on to Manipulate Header Data Sent to Server

Post by Moonchild » 2025-09-04, 06:13

pale guru wrote:
2025-09-04, 02:10
if they ignore Sec-GPC completely, I consider them 'bad' myself.
You can check if a shop intends to follow the Global Privacy Control mandate/legal framework by checking .well-known/gpc.json on the server. If present and set to "true" in the json data you have a conclusive signal they will follow the standard and will not sell or share your data if you send them the Sec-GPC request from the browser. Example on our own website: https://www.palemoon.org/.well-known/gpc.json
Keep in mind that this does not mean they won't be gathering data or fingerprinting/profiling you internally (that is subject to their privacy policy) but Sec-GPC prohibits them from sharing that data with or selling that data to others. That is the main difference between DNT and Sec-GPC. The former (prohibiting any internal data gathering) is unenforceable and breaking many commercial models/technical implementations.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite