SimpleModifyHeaders icon indicating copy to clipboard operation
SimpleModifyHeaders copied to clipboard

header field variables/eval

Open brian6932 opened this issue 9 months ago • 0 comments

So one somewhat odd use case I have's that I spoof referers (network.http.referer.spoofSource), and use this web-extension to selectively enable referers on domains that require them. The problem's that I need the override to be using the current hostname, and sometimes this changes on a shared subdomain, e.g. www.google.com/android/find/ & messages.google.com/web/conversations both request signaler-pa.clients6.google.com & signaler-pa.clients4.google.com. These requests are required for the domains to work properly, the response body indicates that the referer's required, and they get 400 status codes. When the right referer's set, it works as expected. I want some way to execute JS to do string generation within the header's replacement, basically just:

globalThis.location.protocol+'//'+globalThis.location.host+'/'

brian6932 avatar Mar 20 '25 23:03 brian6932