sindresorhus / Plash

💦 Make any website your Mac desktop wallpaper
https://sindresorhus.com/plash
MIT License
3.51k stars 130 forks source link

External Links hide behind the website 301 redirect could not open in browser #79

Open hye opened 3 years ago

hye commented 3 years ago

Describe the bug

External Links hide behind the website redirect could not open in browser

To reproduce

Steps to reproduce the behavior:

  1. website is https://www.producthunt.com/
  2. browsing mode
  3. click either one project GET IT ,eg the link is https://www.producthunt.com/r/611230e242e086, the website will response 301 redirect https://www.redacted.com/product/soft-ui-dashboard?ref=producthunt, but the page still showed in Plash windows

Expected behavior

Detect 301 http code? then open it in System default browser?

Info

Additional context

Add any other context about the problem here.

73

sindresorhus commented 3 years ago

Detect 301 http code? then open it in System default browser?

I agree, but it's not as easy as it sounds as there are a lot of moving parts. I'll try to look closer into this soon.

hye commented 3 years ago

https://developer.apple.com/documentation/foundation/urlsessiontaskdelegate/1411626-urlsession