Proxy or custom HTTP headers possible with Playwright?

I need to simulate authentication by JWT, which is passed in a HTTP header. I also need to add other HTTP headers, for example, one that turns off the CSRF warning (this simulates the reverse proxy server that would ordinarily add this header.)

Can I do this kind of thing in Playwright through Codecept, or do I need WebDriver?