<div dir="ltr">That's unfortunate, so I completely translated ResourceHandler into Scala to be able to add the functionality I need:<div><br></div><div><a href="https://github.com/outr/hyperscala/blob/master/core/jvm/src/main/scala/org/hyperscala/FunctionalResourceManager.scala#L125">https://github.com/outr/hyperscala/blob/master/core/jvm/src/main/scala/org/hyperscala/FunctionalResourceManager.scala#L125</a><br></div><div><br></div><div>It's not the ideal solution, but it does work. I still need to do some cleanup as well, but a simple mechanism to allow some overrides or some separation of this massive block of logic into modular utilities would make Undertow far easier to customize.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 30, 2016 at 6:03 PM Stuart Douglas <<a href="mailto:sdouglas@redhat.com">sdouglas@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The ResourceManager interface was not expected to be able to handle<br>
that, you should probably do that in a handler before the resource<br>
manager is invoked.<br>
<br>
Stuart<br>
<br>
On Wed, Aug 31, 2016 at 6:11 AM, Hicks, Matt <<a href="mailto:matt@matthicks.com" target="_blank">matt@matthicks.com</a>> wrote:<br>
> Thanks Stuart, that did the trick.<br>
><br>
> I'm extending FileResourceManager to convert from the web path to an<br>
> internal storage path and also trying to validation against the session to<br>
> verify the logged-in state. However, I'm running into a roadblock because<br>
> `getResource` doesn't have access to the exchange to be able to get the<br>
> cookie value. I tried using ThreadLocal, but it's dispatched to another<br>
> thread so that won't work either. How am I supposed to access a cookie or<br>
> session from within a ResourceManager.getResource?<br>
><br>
> On Mon, Aug 29, 2016 at 8:05 PM Stuart Douglas <<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>> wrote:<br>
>><br>
>> For servlet or Undertow native?<br>
>><br>
>> For native it is controlled by the<br>
>> io.undertow.server.session.SessionCookieConfig implementation that is<br>
>> passed to the session manager.<br>
>><br>
>> For Servlet the standard way to do it is to use a<br>
>> ServletContextListener to modify the domain under<br>
>> javax.servlet.ServletContext#getSessionCookieConfig<br>
>><br>
>> Stuart<br>
>><br>
>> On Fri, Aug 26, 2016 at 11:31 PM, Hicks, Matt <<a href="mailto:matt@matthicks.com" target="_blank">matt@matthicks.com</a>> wrote:<br>
>> > I can't seem to figure out any way to configure the session manager to<br>
>> > define the domain of the cookie. I want the domain to be *.<a href="http://mydomain.com" rel="noreferrer" target="_blank">mydomain.com</a><br>
>> > so<br>
>> > the cookie is shared across multiple sub-domains. Can someone give me<br>
>> > an<br>
>> > example of how to do this?<br>
>> ><br>
>> > Thanks<br>
>> ><br>
>> > _______________________________________________<br>
>> > undertow-dev mailing list<br>
>> > <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
>> > <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</blockquote></div>