Commit 8a4cf38
feat: add set_extra_http_headers tool for Network.setExtraHTTPHeaders
Add a new MCP tool that allows setting extra HTTP headers on all page
requests via Puppeteer's page.setExtraHTTPHeaders(). Headers persist
across navigations and can be cleared by passing an empty object.
This addresses the need for injecting custom headers (e.g. swim-lane
routing, A/B testing, feature flags) on all request types including
initial document loads, which is not possible with initScript alone.
Closes #1175
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 8c2a7fc commit 8a4cf38
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
89 | 117 | | |
90 | 118 | | |
91 | 119 | | |
| |||
0 commit comments