Refactored addition of proxy headers into two methods,
to allow subclasses to override this behavior more easily.