MarkMunro-5455 avatar image
0 Votes"
MarkMunro-5455 asked SaiKishor-MSFT rolled back

rewrites, setting response cookie "SameSite=none" issue

We have a rewrite requirement in our application that sets a response cookie to "SameSite=none". This is the code block that we needed to comment out to partially get the application to run.

               <rule name="Add SameSite" preCondition="No SameSite">
                   <match serverVariable="RESPONSE_Set_Cookie" pattern=".*" negate="false" />
                   <action type="Rewrite" value="{R:0}; SameSite=none" />
                   <preCondition name="No SameSite">
                       <add input="{RESPONSE_Set_Cookie}" pattern="." />
                       <add input="{RESPONSE_Set_Cookie}" pattern="; SameSite=none" negate="true" />

I've been working on this for a day and this is what I've done so far: ![80724-updaterewrite.png][1]![80725-then.png][2] [1]: /answers/storage/attachments/80724-updaterewrite.png [2]: /answers/storage/attachments/80725-then.png we're trying to replicate how we'd do this in IIS / or Apache but thus far we haven't been successful with App Services and Application Gateway in Azure. Any help would be really appreciated.

updaterewrite.png (33.5 KiB)
then.png (24.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This is the if block of the rewrite rule


0 Votes 0 ·
if.png (26.1 KiB)

0 Answers