Passing Cookies with Reverse Proxy

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 03 Aug 2012, 13:39

Passing Cookies with Reverse Proxy

03 Aug 2012, 13:43

I am using ISAPI_Rewrite 3 as a reverse proxy to forward requests from http://mydomain.com/ to a web app running on http://internalserver/ . Whenever I use session state on the internal app, it sets a cookie, which gets relayed to the browser successfully, but the browser never passes the cookie back. I think this is because the cookie is scoped to the domain "internalserver" instead of "mydomain.com". Is there a way to have ISAPI_REWRITE change the scope on these cookies?

User avatar
Posts: 2
Joined: 03 Aug 2012, 13:39

Re: Passing Cookies with Reverse Proxy

03 Aug 2012, 14:25

One correction. The domain of the cookie doesn't appear to be the problem, it's the path. On the internal server, the app resides at http://internalserver/myapp/ on the external server the location is just http://mydomain.com/ . The cookie has a path of /myapp/ so the browser doesn't pass it back to mydomain.com since it thinks the current path is / .

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Passing Cookies with Reverse Proxy

06 Aug 2012, 06:27

That's not ISAPI_Rewrite that must deal with this. You most definitely need to set up cookies correctly on your side.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 9 guests