I feel that there is a bug with how spring.h2.console.settings.web-allow-others is working.

I have the following lines in my appliation.properties file

spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
spring.h2.console.settings.web-allow-others=false

No matter if the web-allow-others is true/false or missing, I can always get to the h2-console page.

If I set console.enabled=false, then I can not access it at all. I feel that this proves I'm editing the right file, but it's not working.

This is the case if I'm running a compiled jar. If I run with this from inside of the IntelliJ, it will work as expected. Any ideas on what could have been done in the jar compilation to allow this?

For further background, I am using dbh2 1.4.196. with 2.0.0.RELEASE of SpringBoot.

Comment From: wilkinsona

How are you accessing the console to check whether or not web-allow-others is working as you expect? It only controls remote access to the console and you haven't mentioned whether or not you're accessing the console from the same machine as it's running on or from a remote machine. I believe that the console's default is that remote access to be disabled and that is Boot's default (see #5416 and #5417).

Comment From: GRRedWings

I've tried local and from another machine. It appears to work from both.

Oddly, in doing more testing, I'm starting to suspect that it works as expected on a clean VM, but an existing VM that has not had this set to false it does not work properly.

Comment From: snicoll

It appears to work from both.

I am still a bit confused as what error is being reported here. Let us know if you can find a way to reliably show the faulty cause and we can reopen for further investigation.

Comment From: GRRedWings

So the issue is this.

I set web-allow-others to false. On the local machine, I can reach the H2 console, on a remote machine, I can also still reach the console. This is a system that has been running for some time with the console enabled.

on a third, clean VM, I install my jar and run it. With web-allow-others=false I can reach the console local, but not from a remote machine.

Is it possible that on the first machine that had a spring boot instance running that there is something cached or saved local? it is odd to me that sometimes web-allow-others blocks external access, but other times it does not. I have not been able to narrow down a more specific time when it does not work as expected.

Comment From: snicoll

@GRRedWings you may have some override in h2.server.properties in the home directory of that server perhaps? That's the only thing I can think of, sorry.

Comment From: Leo3965

@GRRedWings I faced same issue, I foun this 2 articles.

http://h2database.com/html/tutorial.html?highlight=webAllowOthers&search=webAllowOthers#console_settings ​ http://h2database.com/html/advanced.html?highlight=webAllowOthers&search=webAllowOthers#remote_access

Even setting the properties, adding more options on jar initialization. When I try to access the h2 console, when running the app inside a docker container, it just does not work.