Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
Chrome extension httpRequestHeaders with manifest 3

I'm updating a Chrome extension from manifest 2 to manifest 3. I have some troubles with sending dynamic httpRequestHeaders. It's possible to send these dynamic headers but some headers are blocked ie. "cookies"

So it's possible to send for example:

$.ajax({
   type: "POST",
   url: "SOMEURL",
   data: {
      "id": idValue,
   },
   headers: {
      "blabla": "HARDVALUE"+dynamicValue
   },
   success: ...

and it's not possible to send

$.ajax({
   type: "POST",
   url: "SOMEURL",
   data: {
      "id": idValue,
   },
   headers: {
      "cookie": "HARDVALUE"+dynamicValue
   },
   success: ...

I tried to use a declarativeNetRequest with the rules.json-file but it's hard-coded and not possible to use a dynamic value

[
  {
    "id" : 1,
    "priority": 1,
    "action" : { "type" : "modifyHeaders",
      "responseHeaders": [
        { "header": "Cookie", "operation": "set", "value": "hardCodedValue" }
      ]
    },
    "condition" : {
      "urlFilter" : "SOMEURL",
        "resourceTypes" : ["xmlhttprequest"]
    }
  }
]

This last one is sending the header but I can't use a dynamic custom variable or something. Has anybody a solution for this?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!