Skip to content

fix: default API to localhost#109

Merged
devgianlu merged 1 commit intodevgianlu:masterfrom
aykevl:fix-api-localhost
Oct 2, 2024
Merged

fix: default API to localhost#109
devgianlu merged 1 commit intodevgianlu:masterfrom
aykevl:fix-api-localhost

Conversation

@aykevl
Copy link
Copy Markdown
Contributor

@aykevl aykevl commented Oct 1, 2024

The previous default was to bind to 0.0.0.0 and allow connections from anywhere. I think this is an insecure default, the default should be restricted.

To restore the previous behavior, use:

server:
  address: ""

For example, I'm using the API from Home Assistant running on the same Raspberry Pi. There is no reason for the API to be exposed on my local network. And generally it's a good idea to have safe default values (and require users to opt-in to less safe options).

(Not sure whether this counts as a fix or a feature, but I guess it fixes potential unsafe configurations, so...)

The previous default was to bind to 0.0.0.0 and allow connections from
anywhere. I think this is an insecure default, the default should be
restricted.

To restore the previous behavior, use:

```yaml
server:
  address: ""
```

For example, I'm using the API from Home Assistant running on the same
Raspberry Pi. There is no reason for the API to be exposed on my local
network. And generally it's a good idea to have safe default values (and
require users to opt-in to less safe options).
@devgianlu
Copy link
Copy Markdown
Owner

Seems like the right thing to do.

@devgianlu devgianlu merged commit f83822d into devgianlu:master Oct 2, 2024
@aykevl aykevl deleted the fix-api-localhost branch October 2, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants