Redirecting back to /servicedesk/customer/ portal if I call GET method from Service Desk

Hello,

I am developing a plugin that intercepts /servicedesk/customer/ URL using a servlet filter for all the logged in users to execute some of the operations. The filter has some checks and redirects to the different URL based on the tasks needs to perform.

It works well for all the users who have access to the JIRA Service Desk(licensed users) it means for licensed users it gets redirected to a valid URL from the plugin.

But when a customer(does not have application access) tries to access service portal, he always redirected back to the /servicedesk/customer/ instead of the plugin’s URL(another servlet) and this will result in TO_MANY_REDIRECTS error(respective filter gets executed when it finds /servicedesk/customer/ URL).

Is there any way to solve this issue? Any help would be appreciated.

Thanks in advance.
Vikas

Hello,

I am able to solve this issue by adding tag in atlassian-plugin.xml file.
&ltcustomercontext key="&ltcontext-key-name&gt"
path="/plugins/servlet/&ltyour-servlet-url&gt"&gt
&lturi regex=".*" /&gt
&lt/customercontext&gt

Thanks,
Vikas