Fórum

Filter in liferay.

Hardik Sanghani, modificado 7 Anos atrás.

Filter in liferay.

Junior Member Postagens: 40 Data de Entrada: 16/02/15 Postagens Recentes
Hi all,

I have implemented CAS in Liferay application. Everything is working fine when user browse the liferay application.

Amazon check the health of application using the ip address at that time filter goes in loop and throws stackoverflow error everytime. I tried a lot to fix issue, worked on this issue around 10 + hour but still not able to fixed.

below code is working fine but when amazon make request using private ip address at that time it goes to "Redirection Fail" and goes to infinite loop.


if( domainName.contains("a.xyz.com") || domainName.contains("b.xyz.com") || domainName.contains("c.xyz.com")){
	          System.out.println("Redirecting to login page");
	            httpResponse.sendRedirect("/c/portal/login");
	        }else{
	          System.out.println("Redirection Fail");
	            chain.doFilter(request, response);
	        }


Thank you all
Hardik
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Filter in liferay.

Liferay Legend Postagens: 14915 Data de Entrada: 02/09/06 Postagens Recentes
So have amazon put an extra param on the query string and check for it here to disable the redirect.
Hardik Sanghani, modificado 7 Anos atrás.

RE: Filter in liferay.

Junior Member Postagens: 40 Data de Entrada: 16/02/15 Postagens Recentes
Thank you, David H Nebinger

Ok suppose I added extra parameter for that now If I redirect it to "httpResponse.sendRedirect("/c/portal/login");" then amazon is not able to check health check and it goes out of service and "chain.doFilter(request, response);" is make the request in loop.




if( domainName.contains("a.xyz.com") || domainName.contains("b.xyz.com") || domainName.contains("c.xyz.com")){
              System.out.println("Redirecting to login page");
                httpResponse.sendRedirect("/c/portal/login");
            }else{
              System.out.println("Redirection Fail");
                chain.doFilter(request, response);
            }
Hardik Sanghani, modificado 7 Anos atrás.

RE: Filter in liferay. (Resposta)

Junior Member Postagens: 40 Data de Entrada: 16/02/15 Postagens Recentes
we solved issue, thank you