I am trying to create a RewriteRule which looks at the incoming Header for an APIKey
and if it contains a matching string then it will redirect to respective URL else, it should be inaccessible.
I am testing this scenario using postman with Post method.
Please find my code below:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/manager/(.*)
RewriteCond %{REQUEST_URI} ^/manager/secure/rest/groovy-service-invoke/v2/demo/firewall-test/v0.1.0/(.*)$
RewriteCond %{ENV:APIKEY} ^ABCD123456789$
RewriteRule .* - [E:APIKEY=ABCD123456789]