Jolokia - Origin null is not allowed to call this agent

classic Classic list List threaded Threaded
1 message Options
dfazio dfazio
Reply | Threaded
Open this post in threaded view
|

Jolokia - Origin null is not allowed to call this agent

Hello,

I see that since version 1.6.1 it was added the following change:

"When strict-checking is enabled for a CORS policy, then reject a request also when no Origin or Referer header is given."
https://github.com/rhuss/jolokia/blob/master/agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java

We use jolokia with a perl nrpe check:

./check_json.pl -v -u 'http://localhost:8778/jolokia/read/java.lang:type=Memory/NonHeapMemoryUsage' -a '{status}' -p '{value}->{init},{value}->{max},{value}->{used},{value}->{committed}'

Since the origin is null, the script no longer works now.
I've tried to add the Origin on the header (with a simple curl request as a test) < -H "Origin:localhost" > and still fails.

From my understanding, all Origin are accepted by default (except NULL now), unless you restrict them with a jolokia-access.xml file. So it should work?

I've then tried then to create the XML file, and I've added few accepted origin, such as localhost, 127.0.0.1 but still it doesn't work.

Any ideas/workaround?

Thanks