Feike Visser wrote > hi there, > > Question about the ResourceDecorator [1], since the method with the request > is deprecated I am looking to see how to retrieve the requesting resource. > This mainly in the case of script-resources. > > Like /apps/x was it requested in the context of /content/a or /content/b? > > Any hints/tips? >
It seems we don't have any OOTB mechanism for this, you can get to the resource resolve associated with the thread, but that doesn't really help as that one has no knowledge of the first request. But you can register a org.apache.sling.auth.core.spi.AuthenticationInfoPostProcessor and store the request path or the tenant name as an attribute into the auth info. This auth info is then later on available through the getAttribute method of the resource resolver. Regards Carsten -- Carsten Ziegeler Adobe Research Switzerland [email protected]
