Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

160
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda