Custom plugin only for proxy purpose


(Rahul Saini) #1


I’m developing a custom sonar plugin webpage using PageDefinition.
One of its functionality is getting JSON response from a 3rd party REST service.
As most of the code is JavaScript, I’m facing CORS issue on chrome.

Configuring Apache is out of my control so I’ve rather decided to create another plugin which will act as a proxy, just to handout responses to my UI plugin.

I want this proxy plugin to remain hidden from the users and only accept POST calls (payload will contain thirst party REST call).

Since I’m new to developing sonar plugins:
First question is - Is it possible within sonar plugins?

Supposing, it is possible:
Second question - I’ve gone thru sonarqube documentation, but I’m not able to pinpoint which plugin class to use. Should I use PageDefinition only? (Then how to make it hidden?)

Please suggest.

P.S. - Sorry if this question sounds naive.
Thank you.