Remove the HttpOnly cookie flag in FiddlerScript

1 Answer 230 Views
Fiddler Classic Windows
Alex
Top achievements
Rank 1
Iron
Iron
Alex asked on 01 Sep 2023, 12:45 PM
Is it possible to remove the HttpOnly cookie flag in FiddlerScript?

It appears that the cookie header for this type of cookies is not accessible via oSession.oResponse.headers['Set-Cookie']. Is this by design, or am I missing something?

Thank you,
Alex

1 Answer, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
Iron
Iron
answered on 02 Sep 2023, 10:29 AM
Thanks to this article, I've got it working after all. Here's the code, if anyone is interested...

for (var x:int = 0; x < oSession.oResponse.headers.Count(); x++) {
  if(oSession.oResponse.headers[x].Name.Contains("Set-Cookie")) {
    var cookie : Fiddler.HTTPHeaderItem = oSession.oResponse.headers[x];
    cookie.Value = cookie.Value.replace(/( |)HttpOnly(\;|)/i, "");
  }
}
Zhivko
Telerik team
commented on 04 Sep 2023, 06:59 AM | edited

Hello Alex,

We are glad you found a solution to your problem. And thank you for sharing it with the community.

Regards,
Zhivko Piskov
Progress Telerik


Tags
Fiddler Classic Windows
Asked by
Alex
Top achievements
Rank 1
Iron
Iron
Answers by
Alex
Top achievements
Rank 1
Iron
Iron
Share this question
or