[BUG] Impossible to use API while running as HA addon
Closed this issue · 4 comments
Describe the bug
Introduction of ipfilter in HA_ADDON mode breaks API access.
Version of Double Take
1.13.11.3
Expected behavior
Even with the listening port (3000 or otherwise) enabled requests from anywhere other than ingress get an access denied message, which breaks API access (e.g. for custom automation that attempts to provide another source of images.) Please revert this behavior or make in dependent on the listening port being enabled or otherwise configurable.
Can confirm I experience the same. When accessing the addon directly I get:
"{"error":"Access denied to IP address: ::ffff:192.168.1.227"}"
The mentioned IP is the IP of the laptop through which I am trying to access Doubletake
I can confirm that this issue is not present in the version of Jakowenko (but that version has got the problem that it keeps on crashing after a few minutes)
Relevant log:
error: IpDeniedError: Access denied to IP address: ::ffff:192.168.1.227
at error (/double-take/api/node_modules/express-ipfilter/lib/ipfilter.js:156:17)
at /double-take/api/node_modules/express-ipfilter/lib/ipfilter.js:202:12
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)
at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/double-take/api/node_modules/express/lib/router/index.js:328:13)
at /double-take/api/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/double-take/api/node_modules/express/lib/router/index.js:346:12)
at next (/double-take/api/node_modules/express/lib/router/index.js:280:10)
at module.exports (/double-take/api/src/middlewares/respond.js:54:3)
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)
direct access is insecure. "ingress" addon feature is strongly recommended for all add-ons by HA team.
for solve your problem you can use add-ons, such as "Nginx proxy manager"