Tuckey Proxy Rewrites Dropping the User Session

12 views
Skip to first unread message

Ryan Simmons

unread,
Aug 25, 2017, 11:31:08 AM8/25/17
to dotCMS User Group
We are running into a session bug having to do with Tuckey URL Rewrites (via proxy). We are running a 3.6.2 site.

We have Tuckey rewriting URLs that looks like this: www.website.com/products?region=US&lang=1 to look like this: www.website.com/us/en/products. We are handling this via a proxy rewrite in Tuckey. So far, so good. All pages display the right content for the right region in the right language.

We are authenticating users against a third-party legacy data service, using a DotCMS user session. This works correctly as well.

But if a user attempts to access a Tuckey-rewritten URL, their session seems to magically disappear. If we manually remove the tuckey-additions from the URL, the session magically comes back and they are logged in once again.

Digging into this yesterday, we figured out that the IP address attached to a user session on a normal URL is different from the IP address attached to a session when using a Tuckey URL. It looks like Tuckey proxying is grabbing either the local IP address or the IP address of a CDN server between the user and the DotCMS server.

So, here's the question...

What can we do to preserve the user session and our SEO-friendly URLs? Is this something we can change in the Tuckey plugin, or something we can change with Apache settings? Is there something we can do in DotCMS itself?

Ryan

Jason Tesser

unread,
Aug 25, 2017, 12:10:47 PM8/25/17
to dotCMS User Group
try adding this to the <to ..> of the proxy 
drop-cookies="false"
so 
<to .. drop-cookies="false" ...>

I am assuming from what you said that the to is using type="proxy"

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/b594795f-36ee-4114-ab77-e0e2fa11fb3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

ry...@ethode.com

unread,
Aug 28, 2017, 2:24:52 PM8/28/17
to dotCMS User Group
Thanks LORDs_diakonos, there a way to do this in an OSGI plugin, rather than in a static plugin?

Jason Tesser

unread,
Aug 28, 2017, 2:34:36 PM8/28/17
to dotCMS User Group
wherever you create the rule

it is part of the rule 

On Mon, Aug 28, 2017 at 2:25 PM Ryan Simmons <greatam...@gmail.com> wrote:
Thanks! Would this be done in our Tuckey plugin? Or in a config file?


On Friday, August 25, 2017 at 12:10:47 PM UTC-4, LORDs_diakonos wrote:
Reply all
Reply to author
Forward
0 new messages