Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS error when trying to access second node #585

Open
davepwsmith opened this issue Jul 2, 2023 · 2 comments
Open

CORS error when trying to access second node #585

davepwsmith opened this issue Jul 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@davepwsmith
Copy link

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

  1. Connect second device as node
  2. Go to dashboard
  3. Click secondary node in dropdown
  4. 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.

@davepwsmith davepwsmith added the bug Something isn't working label Jul 2, 2023
@ravenclaw900
Copy link
Owner

ravenclaw900 commented Jul 2, 2023

Hi,
To be completely honest, connecting to another node has been broken entirely for various reasons in the 0.6.1 release (see #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.

@davepwsmith
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants