on the adaptTo() conference there was feedback from one participant after my 
talk [1]:
- he asked if it is possible to provide different context-aware configuration 
for different hostnames, but with the same content path
- i assume this is some tenant-specific solution where all tenants share the 
same content, but display different personalization

technically speaking we would need to extend the methods in the 
ConfigurationResourceResolvingStrategy interface [2] with an additional 
SlingServletRequest parameter to support detecting the matching config path 
based on information from there e.g. domain name.

but this would only be possible if we extend the ConfigurationResolver/Builder 
API as well and pass in the current request - otherwise we have no means to get 
it (or only via a unloved threadlocal hack). we have to make it optional, 
because in most cases the request will not be needed. but then applications 
requiring request-based configuration solution always need to make sure they 
provide this additional parameter. it also gets difficult to provide 
configuration editor GUI support in this case, because the domain names are not 
known in the author instance, mapping only takes place on the publish instances.

WDYT - should we add support for it? not sure if this is really a common 
usecase.

stefan

[1] https://adapt.to/2016/en/schedule/sling-context-aware-configuration.html
[2] 
https://github.com/apache/sling/blob/trunk/contrib/extensions/contextaware-config/spi/src/main/java/org/apache/sling/contextaware/config/resource/spi/ConfigurationResourceResolvingStrategy.java


Reply via email to