• Is it possible to set a requestheader early with an env= as well?

    From rich071984@gmail.com@21:1/5 to All on Tue Aug 28 08:14:26 2018
    Hi All

    I am working on a system that needs to send Bearer token keys (JWT) for all URLs from an app our company is developing, the problem occurs when there is an attachment that needs to be downloaded, when clicking the link it fires the browser on the mobile
    device.

    As you know this will not allow the headers to be set, so am working on a solution to add the header if it is emtpy.

    Now I can get the env variable populated from the query string.

    But I need a way to set the requestheader early along with the env= value, is this possible?

    This is what I have:

    RewriteCond %{QUERY_STRING} (?:^|&)token=([^&]+)
    RewriteRule (.*) - [E=QS_TOKEN:%1]
    RequestHeader setIfEmpty Authorization "Bearer %{QS_TOKEN}e" "env=QS_TOKEN"

    What I need to do is something like:

    RewriteCond %{QUERY_STRING} (?:^|&)token=([^&]+)
    RewriteRule (.*) - [E=QS_TOKEN:%1]
    RequestHeader setIfEmpty Authorization "Bearer %{QS_TOKEN}e" "env=QS_TOKEN early"

    But this does not work.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)