[undertow-dev] Session Cookie Domain?

Stuart Douglas sdouglas at redhat.com
Tue Aug 30 19:03:55 EDT 2016


The ResourceManager interface was not expected to be able to handle
that, you should probably do that in a handler before the resource
manager is invoked.

Stuart

On Wed, Aug 31, 2016 at 6:11 AM, Hicks, Matt <matt at matthicks.com> wrote:
> Thanks Stuart, that did the trick.
>
> I'm extending FileResourceManager to convert from the web path to an
> internal storage path and also trying to validation against the session to
> verify the logged-in state.  However, I'm running into a roadblock because
> `getResource` doesn't have access to the exchange to be able to get the
> cookie value.  I tried using ThreadLocal, but it's dispatched to another
> thread so that won't work either.  How am I supposed to access a cookie or
> session from within a ResourceManager.getResource?
>
> On Mon, Aug 29, 2016 at 8:05 PM Stuart Douglas <sdouglas at redhat.com> wrote:
>>
>> For servlet or Undertow native?
>>
>> For native it is controlled by the
>> io.undertow.server.session.SessionCookieConfig implementation that is
>> passed to the session manager.
>>
>> For Servlet the standard way to do it is to use a
>> ServletContextListener to modify the domain under
>> javax.servlet.ServletContext#getSessionCookieConfig
>>
>> Stuart
>>
>> On Fri, Aug 26, 2016 at 11:31 PM, Hicks, Matt <matt at matthicks.com> wrote:
>> > I can't seem to figure out any way to configure the session manager to
>> > define the domain of the cookie.  I want the domain to be *.mydomain.com
>> > so
>> > the cookie is shared across multiple sub-domains.  Can someone give me
>> > an
>> > example of how to do this?
>> >
>> > Thanks
>> >
>> > _______________________________________________
>> > undertow-dev mailing list
>> > undertow-dev at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list