Jump to content
Welcome to our new Citrix community!

Rewrite Set-Cookie attribute Domain in Response


Recommended Posts

I would appreciate your help. I want to implement a reverse proxy on Citrix ADC instead of a similar one implemented on IIS. Since I am new in Citrix ADC, need your help in writing the correct Rewrite policy and action. So that the Domain attribute in Set-Cookie Header is overwritten in responses from one value1 to value2 .
I cannot use URL Transformation for this purpose, since this mode is not supported in the administrative partition.
Thank you so much!

Link to comment
Share on other sites

13 hours ago, Konstantin Voronov1709159048 said:

I would appreciate your help. I want to implement a reverse proxy on Citrix ADC instead of a similar one implemented on IIS. Since I am new in Citrix ADC, need your help in writing the correct Rewrite policy and action. So that the Domain attribute in Set-Cookie Header is overwritten in responses from one value1 to value2 .
I cannot use URL Transformation for this purpose, since this mode is not supported in the administrative partition.
Thank you so much!

Hi,

If I understand correctly you can try this.

 

add rewrite action replace_act replace "HTTP.REQ.HEADER(\"value1\")" "\"value2\""
add rewrite policy Header-Rewrite-Pol "HTTP.REQ.HEADER(\"value1\").NE(\"value2\")" replace_act
bind lb vserver "vip name" -policy Header-Rewrite-Pol -priority 100 -type REQUEST

 

Thanks

Manoj

 

Link to comment
Share on other sites

51 minutes ago, Manoj Rana said:

Hi,

If I understand correctly you can try this.

 

add rewrite action replace_act replace "HTTP.REQ.HEADER(\"value1\")" "\"value2\""
add rewrite policy Header-Rewrite-Pol "HTTP.REQ.HEADER(\"value1\").NE(\"value2\")" replace_act
bind lb vserver "vip name" -policy Header-Rewrite-Pol -priority 100 -type REQUEST

 

Thanks

Manoj

 

Hi, Manoj

In my opinion, not quite so.
I need rewrite value of Domain attribut at Response Header Set-cookie:
for examle from "mont.com" то "mont.by"
I try create:
add rewrite action set_cookie_domain_mont_by_act REPLACE_ALL HTTP.RES.FULL_HEADER ""Domain=mont.by"" -search "regex(re(...)"
add rewrite policy set_cookie_domain_mont_by_pol "HTTP.RES.HEADER("Set-Cookie").EXISTS" set_cookie_domain_mont_by_act
Have a problem writing the correct regex expression to find the domain value. 
If this option is in principle applicable here.

Thanks
Konstantin
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...