DietPi-Dashboard
DietPi-Dashboard copied to clipboard
CORS error when trying to access second node
Describe the bug: I have a headless dashboard node, and a main node with the dashboard UI. When I try to access the headless node via the dropdown, the page just sits there, and when I inspect I can see that there is a CORS error on the request:
Access to fetch at 'http://192.168.68.6:5252/login/' from origin 'http://192.168.68.5:5252' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Version of DietPi-Dashboard: 0.6.1
Nightly or stable: Stable
Version of DietPi: 8.19.1
Device architecture: aarch64 (main) / armv6l (node)
To Reproduce
- Connect second device as node
- Go to dashboard
- Click secondary node in dropdown
- Click login button
Error log
Access to fetch at 'http://192.168.68.6:5252/login/' from origin 'http://192.168.68.5:5252' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Hi, To be completely honest, connecting to another node has been broken entirely for various reasons in the 0.6.1 release (see https://github.com/ravenclaw900/DietPi-Dashboard/issues/548). The current simplest workaround that should let you connect is to remove the password from the second node, but that can obviously be a huge security hole (downgrading to 0.6.0 should also fix the issue).
I've been very busy lately, so I haven't had any time to work on fixing the issue, or the dashboard in general. However, over the next few days I can actually get around to working on the backlog of dependency upgrades, stale PRs, planned features etc. that I haven't been able to before.
Hi,
Thanks for replying so quickly. I would offer to help, but I am afraid that Rust is quite a long way out of my wheelhouse!
Cheers.