Forum Discussion

eLeCtRoN's avatar
eLeCtRoN
Icon for Cirrus rankCirrus
Feb 12, 2018

Proxy iRule

Hello everybody

 

I have some use cases for a proxy irule and I need recommendations on how best to implement them

 

Rewirte

RewriteRule /portal/([A-Za-z0-9])/(.) $1/$2

 

RewriteRule /test/(.) $1

RewriteRule /ABC/(.) http://$1/$1/$2

 

 

Flag Rewirte

E flag Causes an environment variable VAR to be set env|E=[!]VAR[:VAL], new http-headervalue for x-orig-protocol-host, NE-flag: By default, special characters, such as & and ?, for example, will be converted to their hexcode equivalent. Using the [NE] flag prevents that from happening

 

URL des Requests im Format Protokoll://Host[:port} extract and Forward as header. Redmine 7678

 

RewriteRule .* - [E=INFO_HTTP_HOST:%{HTTP_HOST},NE]

 

RewriteRule .* - [E=INFO_SERVER_PORT:%{SERVER_PORT},NE]

RewriteCond %{HTTPS} on

 

RewriteRule .* - [E=INFO_PROTOCOL:https,NE]

RewriteCond %{HTTPS} off

 

RewriteRule .* - [E=INFO_PROTOCOL:http,NE]

RequestHeader set x-orig-protocol-host "%{INFO_PROTOCOL}e://%{INFO_HTTP_HOST}e"

 

 

x-forwarded

X-Forwarded-For The IP address of the Client.

 

X-Forwarded-Host The original host requested by the client in the Host HTTP request header.

 

X-Forwarded-Server The hostname of the proxy server.

 

and

 

ProxyPassReverse /dogeatdog/

 

Rewrites

when at the beginning login.bla is, flag R=redirect, default ist 302 (found) , flag L = last

 

 

RewriteRule ^/login.(.*) https://www.test-office.de/login.$1

 

RegPage

Redirect to SSL, Session Handling Secure Cookies

 

RewriteRule ^/(.)/logon.(.) https://www.test-office.de/$1/logon.$2

 

I need an iRule solution for every scenario above, i'm not so familiar with iRules sorry

 

 

THX Manuel

 

No RepliesBe the first to reply