Skip to content

Commit

Permalink
Merge pull request #144 from RandallAnjie/Randall
Browse files Browse the repository at this point in the history
修复网易云等网站icon显示异常的问题
  • Loading branch information
kingwrcy authored Jun 25, 2024
2 parents 4fa9745 + 9766ef2 commit 775e538
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/api/memo/readExternal.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export default defineEventHandler(async (event) => {
}else{
href = urlObject.origin+'/favicon.ico';
}
if (!href.startsWith("http")) {
if (href.startsWith("//")) {
href = urlObject.protocol + href;
} else if (!href.startsWith("http")) {
href = urlObject.origin + (href.startsWith('/') ? href : '/'+href);
}

Expand Down

0 comments on commit 775e538

Please sign in to comment.