mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
fix: restore User-Agent header in website icon proxy to fix favicon display
Co-authored-by: shuaiplus <100134295+shuaiplus@users.noreply.github.com>
This commit is contained in:
committed by
Shuai
parent
43ec591414
commit
99f5bc735e
@@ -87,6 +87,7 @@ async function handleWebsiteIcon(host: string): Promise<Response> {
|
|||||||
const upstream = `https://favicon.im/${encodeURIComponent(normalizedHost)}`;
|
const upstream = `https://favicon.im/${encodeURIComponent(normalizedHost)}`;
|
||||||
try {
|
try {
|
||||||
const resp = await fetch(upstream, {
|
const resp = await fetch(upstream, {
|
||||||
|
headers: { 'User-Agent': 'NodeWarden/1.0' },
|
||||||
redirect: 'follow',
|
redirect: 'follow',
|
||||||
cf: {
|
cf: {
|
||||||
cacheEverything: true,
|
cacheEverything: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user