apache/trafficserver — pull request #152 by sc0ttbeardsley (2014-11-25 16:57:00+00:00)
Title: [TS-3211] Add support for modifying the SCHEME via header_rewrite

I need a way to rewrite the destination scheme based on a request header. It looks like it was partially added before (I see URL_QUAL_SCHEME in statement.h already) but the actual implementation was missing.

Here is an example:

cond %{READ_REQUEST_HDR_HOOK} [AND]
cond %{CLIENT-HEADER:X-Force-Origin-To-Use-HTTPS} /1/
set-destination PORT 443
set-destination SCHEME https