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 errors and login failure with selfhosted version #229

Closed
1 of 3 tasks
Close04 opened this issue Apr 4, 2024 · 4 comments
Closed
1 of 3 tasks

CORS errors and login failure with selfhosted version #229

Close04 opened this issue Apr 4, 2024 · 4 comments

Comments

@Close04
Copy link

Close04 commented Apr 4, 2024

Issue Description
Using docker self hosted version and Firefox. puter.zyx and api.puter.zyx are registered in DNS server pointing to the correct IP running the container, and resolve properly.

Firefox shows a lot of CORS errors in console: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.puter.localhost:4100/socket.io/?auth_token=null&EIO=4&transport=polling&t=Owh0Qlq. (Reason: CORS request did not succeed). Status code: (null).

Login with default_user and randomly generated password from console fails with a red rectangle above the login form. Not sure if the issues are related and why api.puter.localhost is showing up, I am not using that hostname.

Steps to Reproduce
Load the base URL puter.zyx:4100 for the console errors, attempt login with default credentials results in login failure.

Expected & Actual Behavior
Login screen should load with no errors in console, or at least no mentions of hostnames that are not registered anywhere in DNS. Login with password provided in console should also work.

Addition Information or Screenshots (if applicable)
image
image

Tooling

  • Development (npm run start)
  • Docker (via docker run)
  • Docker (via docker-compose)

Puter version (if accessible)

Click the profile button on the top-right, then "Settings". The version number will be printed at the bottom
puter:latest

@MohamedElashri
Copy link
Contributor

If you are by any chance using Cloudflare DNS, then you might need to look into #221

@Close04
Copy link
Author

Close04 commented Apr 4, 2024

I'm using PiHole, the IP and hostname are local/private. Also no proxy, the container is running on one machine (a NAS), I'm trying to access from another in the same network.

The docs mention "puter.local" as the base domain name rather than the puter.localhost that I see in the console. But my local domain isn't "localhost" so the resolution won't work if I try with that.

@KernelDeimos
Copy link
Contributor

Currently it is necessary to update domain in config/config.json to the desired domain. The default setting for this is puter.localhost

@Close04
Copy link
Author

Close04 commented Apr 5, 2024

Aah, I see it now, it was in the main readme.md 😫. Don't troubleshoot in the middle of the night I guess. Thank you!

@Close04 Close04 closed this as completed Apr 5, 2024
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

No branches or pull requests

3 participants