sensepost / gowitness

🔍 gowitness - a golang, web screenshot utility using Chrome Headless
GNU General Public License v3.0
2.87k stars 329 forks source link

Is it possible to set custom headers when taking screenshots through the API? #143

Closed icehacker33 closed 2 years ago

icehacker33 commented 2 years ago

Hello @leonjza, I need to set a JWT authorization header and it is not clear to me whether this is possible, could you clarify please?

leonjza commented 2 years ago

It doesn't at the moment, but shouldn't be too hard to add!

leonjza commented 2 years ago

Just added it. API calls would look something like this.

curl -X POST http://localhost:7171/api/screenshot --data '{"url":"<url>", "oneshot": "false", "headers": ["foo: bar", "baz: foo"]}'
icehacker33 commented 2 years ago

Many thanks @leonjza, much appreciated!