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

Ignore CORS #23

Merged
merged 2 commits into from
Feb 10, 2023
Merged

Ignore CORS #23

merged 2 commits into from
Feb 10, 2023

Conversation

jeffvli
Copy link
Owner

@jeffvli jeffvli commented Feb 5, 2023

No description provided.

@vercel
Copy link

vercel bot commented Feb 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
feishin ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 8, 2023 at 10:24PM (UTC)

@github-actions
Copy link

github-actions bot commented Feb 5, 2023

Download the artifacts for this pull request:

@jeffvli
Copy link
Owner Author

jeffvli commented Feb 8, 2023

@lennartbrandin I've pushed some additional changes which I believe may fix the CORS issue. Can you try the updated build?

@lennartbrandin
Copy link

Using the linux-binaries.zip that the github-actions bot linked. (I assume them up to date because it updated a few hours ago)

I did not notice any different behavior than mentioned before.

@jeffvli
Copy link
Owner Author

jeffvli commented Feb 8, 2023

Hmm.. I'm not sure why it's not working.

For reference, this is what's currently being applied:

  1. webSecurity: false in the electron browser window web preferences.
  2. Setting the fetch mode to cors

I did a bit of testing of my side albeit without using a self signed certificate but it seemed to ignore properly ignore CORS. I'll try some additional testing when I have the chance.

@lennartbrandin
Copy link

Screenshots from the debugging tool.
Screenshot from 2023-02-08 21-23-05
Screenshot from 2023-02-08 21-24-29

I've seen mentions of using an ignore certificate errors switch in addition to webPreference settings.
(Note that i've no/little experience using electron/ts)

@jeffvli
Copy link
Owner Author

jeffvli commented Feb 8, 2023

Thanks for that info!
I've pushed another change that adds an additional "Ignore SSL" toggle in the server list.

Let me know how that goes after the publish build finishes.

@lennartbrandin
Copy link

I can confirm that this works, both for self signed certificates, as for domain mismatching certificates.
(Note that your auto updating feature may irritate when testing a unstable binary and it "updates" to the latest official release)

@jeffvli
Copy link
Owner Author

jeffvli commented Feb 10, 2023

I'll add an additional toggle to disable automatic updates in a later pr.

@jeffvli jeffvli merged commit c878e36 into development Feb 10, 2023
@jeffvli jeffvli deleted the feature/#16 branch February 13, 2023 13:01
@redthing1
Copy link

I still seem to be having CORS issues in my client though

@lennartbrandin
Copy link

Please try to provide more information about what you tried, what happend, what you expect would happen, and if possible logs/webconsole output.

@redthing1
Copy link

Is the web console on in production builds? How do I open it? If not I'll get back to you from running the dev version later

@jeffvli
Copy link
Owner Author

jeffvli commented Dec 8, 2023

Ctrl + Shift + I or there's a menu option in the file menu to open the web devtools.

@redthing1
Copy link

Screenshot 2023-12-08 at 7 46 49 PM

Well, i'm on Feishin v0.5.2, and with the switch on^ (obviously I restarted)

Screenshot 2023-12-08 at 7 47 22 PM

@jeffvli
Copy link
Owner Author

jeffvli commented Dec 9, 2023

I need more details like:

  • What server are you using? (Navidrome or Jellyfin)
  • Running the web or desktop version? (I'm assuming desktop here)
  • Are all the API requests failing, and if not which ones are failing?
  • Is your server being accessed behind a reverse proxy?
  • If yes to the above, does switching to the private URL resolve the issue?

@redthing1
Copy link

  • Jellyfin
  • Desktop
  • Other API requests (fetching album data, etc.) work fine, and our web frontend works fine. What's failing is specifically album covers
  • Server is behind a reverse proxy. Accessing the private URL is not feasible in this case.

@redthing1
Copy link

Sadly, still appears to be broken on the latest version. I will investigate using the debug inspector at some point.

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

Successfully merging this pull request may close these issues.

Option to ignore certificate legitimacy
3 participants