-
Notifications
You must be signed in to change notification settings - Fork 8
Description
The Adaptive Form Service rendering code in FluentFormsAutoConfiguration.java always uses StandardFormsFeederUrlFilters.getStandardInputStreamFilter(). Instead, this should be configurable.
It should be configurable in a couple of different ways. The client should be able replace this filter with a custom filter and there there should be an application.properties entry that can provide an appPrefix to the standardStreamFilter.
I would propose that I update the autoconfiguration class to look for a bean named afInputStreamFilter that implements Function<InputStream, InputStream>. If not provided, then it would default to StandardFormsFeederUrlFilters.getStandardInputStreamFilter().
This would allow you to provide a bean that would override the default using something like:
@Bean
public Function<InputStream, InputStream> afInputStreamFilter() {
return StandardFormsFeederUrlFilters.getStandardInputStreamFilter("/myClientApp");
}Also, if no afInputStreamFilter is supplied but a configuration property called fluentforms.af.appPrefix is supplied, then we should set the appPrefix on the standardInputStreamFilter using the value of that property