diff --git a/API.md b/API.md index c61c6fc1c..333f4a61c 100644 --- a/API.md +++ b/API.md @@ -851,6 +851,8 @@ return: "hassos": "null|version", "docker": "version", "hostname": "name", + "operating_system": "HassOS XY|Ubuntu 16.4|null", + "features": ["shutdown", "reboot", "hostname", "services", "hassos"], "machine": "type", "arch": "arch", "supported_arch": ["arch1", "arch2"], diff --git a/supervisor/api/info.py b/supervisor/api/info.py index c8e889690..6fc098ca0 100644 --- a/supervisor/api/info.py +++ b/supervisor/api/info.py @@ -8,11 +8,13 @@ from ..const import ( ATTR_ARCH, ATTR_CHANNEL, ATTR_DOCKER, + ATTR_FEATURES, ATTR_HASSOS, ATTR_HOMEASSISTANT, ATTR_HOSTNAME, ATTR_LOGGING, ATTR_MACHINE, + ATTR_OPERATING_SYSTEM, ATTR_SUPERVISOR, ATTR_SUPPORTED, ATTR_SUPPORTED_ARCH, @@ -36,6 +38,8 @@ class APIInfo(CoreSysAttributes): ATTR_HASSOS: self.sys_hassos.version, ATTR_DOCKER: self.sys_docker.info.version, ATTR_HOSTNAME: self.sys_host.info.hostname, + ATTR_OPERATING_SYSTEM: self.sys_host.info.operating_system, + ATTR_FEATURES: self.sys_host.supported_features, ATTR_MACHINE: self.sys_machine, ATTR_ARCH: self.sys_arch.default, ATTR_SUPPORTED_ARCH: self.sys_arch.supported, diff --git a/supervisor/api/security.py b/supervisor/api/security.py index 46a252a19..a213c594d 100644 --- a/supervisor/api/security.py +++ b/supervisor/api/security.py @@ -50,13 +50,11 @@ OBSERVER_CHECK = re.compile( ADDONS_API_BYPASS = re.compile( r"^(?:" r"|/addons/self/(?!security|update)[^/]+" - r"|/secrets/.+" r"|/info" r"|/hardware/trigger" r"|/services.*" r"|/discovery.*" r"|/auth" - r"|/host/info" r")$" )