Fixes #1515 Support Set-Cookie header rewriting and configuration