haveachin / infrared

An ultra lightweight minecraft reverse proxy and idle placeholder
https://infrared.dev
GNU Affero General Public License v3.0
722 stars 60 forks source link

Defaults override individual server configs #192

Closed 6ixfalls closed 5 months ago

6ixfalls commented 9 months ago

Describe the bug Defining defaults overrides any values you set in a server; this should be the other way around, where the explicit values set in the server override the defaults.

To Reproduce What OS are you using? Dockerized (Kubernetes)

What version of Infrared are you using? rewrite 2.0.0-alpha.14

What do your Infrared proxy config(s) look like? Should be reproducable with a simple config:

defaults:
  java:
    server:
      dialTimeoutMessage: Random message default.
java:
  servers:
    test:
      dialTimeoutMessage: What should be shown.

(required values not shown)

How do you trigger the bug/issue? You can call the /v1/configs/reload endpoint to see that "What should be shown." does not show up under the server block. In addition, you can try connecting, and the second message won't be shown. You can also remove the dialTimeoutMessage from defaults; in that case, "What should be shown." is shown as well as in the API.

Expected behavior "What should be shown." should be the timeout message, the server block should override the defaults.

haveachin commented 9 months ago

That's odd. I'm gonna look into it.

haveachin commented 5 months ago

This version of Infrared will no longer be supported. Sorry for any inconvenience.