On Sun, Feb 25, 2018 at 11:32 PM Hasintha Indrajee <[email protected]>
wrote:

> We have the tenant context rewrite valve which dispatches original request
> to a the context after removing tenant context (/t/tenantDomain). Hence
> servlet filters are not getting engaged for these dispatched requests. We
> need to add an extra <dispatcher> element to our servlet filters in order
> to execute them for dispatched requests as well. Below are two examples
> without and with extra dispatcher element.
>
> Shall we add this for all our filters ?
>
+1

Also, check whether the filters are getting executed for non web app
requests. (Ex. Identity servlet).

<TenantContextsToRewrite>
        <WebApp>
            <Context>/api/identity/user/v1.0/</Context>
            <Context>/api/identity/consent-mgt/v1.0/</Context>
            <Context>/api/identity/recovery/v0.9/</Context>
            <Context>/oauth2/</Context>
            <Context>/scim2/</Context>
            <Context>/api/identity/entitlement/</Context>
            <Context>/api/identity/oauth2/dcr/v1.0/</Context>
        </WebApp>
        <Servlet>
            <Context>/identity/(.*)</Context>
        </Servlet>
    </TenantContextsToRewrite>



Thanks
Isura.

>
>
> Without FORWARD dispatcher
>
> <filter-mapping>
>
>         <filter-name>CaptchaFilter</filter-name>
>
>         <url-pattern>/*</url-pattern>
>
>         <dispatcher>REQUEST</dispatcher>
>
>     </filter-mapping>
>
>
> With FORWARD dispatcher (additionally we can have INCLUDE dispatcher as
> well if we are including without forwarding)
>
> <filter-mapping>
>
>         <filter-name>CaptchaFilter</filter-name>
>
>         <url-pattern>/*</url-pattern>
>
>         <dispatcher>REQUEST</dispatcher>
>
>         <dispatcher>FORWARD</dispatcher>
>
>         <dispatcher>INCLUDE</dispatcher>
>
> </filter-mapping>
>
>
>
>
> --
> Hasintha Indrajee
> WSO2, Inc.
> Mobile:+94 771892453 <077%20189%202453>
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to