Implement other parts of request rewriting based on settings.

This includes query string appending, setting headers, and setting backend HTTP
basic auth settings.