benwinding / newsit

Chrome Extension for Hacker News and Reddit Links
https://newsit.benwinding.com
MIT License
23 stars 1 forks source link

Reddit not working in chrome browser #1

Closed kuranai closed 3 years ago

kuranai commented 4 years ago

Hi,

i have seen, that the reddit part is not working at the moment for the chrome browser. When I open the inspector I can see some errors for reddit:

image

If someone want's to take a look, here are the given urls from the message:

benwinding commented 4 years ago

Thanks for reporting the issue @kuranai,

I just assumed that Reddit was blocking CORS requests, but as you mentioned, it seems that the CORB is a Chrome specific thing, the reddit endpoint still works in Firefox.

Looks like it's due to the content-script making the request to reddit, when it would be better for the background-script to make that request (as detailed in the StackOverflow answer).

I'll try and implement this and update the extension soon.

Thanks again, let me know if there's any further issues. Cheers, Ben