Preparse the newsletter content

This commit is contained in:
Hongbo Wu
2023-02-17 09:49:19 +08:00
parent 9acce06744
commit 7f761049d7
4 changed files with 28 additions and 2 deletions

View File

@ -466,6 +466,8 @@ export const parseEmailAddress = (from: string): addressparser.EmailAddress => {
export const fetchFavicon = async (
url: string
): Promise<string | undefined> => {
// don't fetch favicon for fake urls
if (url.startsWith(FAKE_URL_PREFIX)) return undefined
try {
// get the correct url if it's a redirect
const response = await axios.head(url, { timeout: 5000 })