johnste / finicky

A macOS app for customizing which browser to start
MIT License
3.72k stars 137 forks source link

Outlook Safelinks #241

Closed sepsamavi closed 2 years ago

sepsamavi commented 2 years ago

Is your feature request related to a problem? Please describe. Some professional Exchange email servers force users to have Microsoft's so-called Safelinks. The Safelinks feature forces all links in an email to be replaced with something of the form https://xxx.safelinks.protection.outlook.com/xxxxxxx Thus, when opening any links from that Exchange account in the Mail app, Finicky does not route as expected since the original link is not visible to Finicky.

Describe the solution you'd like Would it be possible to configure Finicky such that for all links of the form https://xxx.safelinks.protection.outlook.com/xxxxxxx, Finicky first evaluates the redirect from outlook to the underlying link, and then pushes the underlying link (that outlook redirected to) to the appropriate browser based on the Finicky config file?

johnste commented 2 years ago

There is already a short url resolver in Finicky that attempts to resolve short urls such as https://tinyurl.com/5yhwcvh7. It uses a whitelist of domains it tries to resolve urls for. You can add more domains in that list, please see the urlShorteners open mentioned here https://github.com/johnste/finicky/wiki/Configuration#general-options

image Example: Opening https://tinyurl.com/5yhwcvh7 in Finicky automatically resolves it to the final url on youtube.

sepsamavi commented 2 years ago

Wonderful, Thanks! I had overlooked the ability to extend the list urlShorteners list.