0

I am using the JavaMelody library and I would like to restrict access to the context / monitoring.

Currently, I have added an entry in web.xml:

<init-param>
    <param-name>allowed-addr-pattern</param-name>
    <param-value>(first_ip)|(second_ip)</param-value>
</init-param>

But when I call up the resource / monitoring, it receives "Forbidden access"

Is it possible to restrict access only for specific IP addresses?

Jignasha Royala
  • 1,032
  • 10
  • 27
LLL RRR
  • 189
  • 13

1 Answers1

0

The IP address of your computer, as seen by the server, does not match the regexp in allowed-addr-pattern.

So either you have miswritten the regexp in allowed-addr-pattern or you have something like a Apache http proxy which is masking the IP addresses seen by your server.

You may want to use the authorized-users parameter to have basic authentication instead of using allowed-addr-pattern.

evernat
  • 1,713
  • 13
  • 18