경로 기반 파비콘 지원
- ncue.net 및 하위 도메인에서 /{첫경로}/favicon.ico 우선 사용
- index.html 폴백 모드에서도 파비콘 이미지 렌더링 및 실패 시 글자 폴백
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -184,6 +184,12 @@
|
||||
function faviconUrl(url) {
|
||||
try {
|
||||
const u = new URL(url);
|
||||
// default: site root favicon
|
||||
// special: allow per-path favicon like https://ncue.net/dsyoon/favicon.ico (internal only)
|
||||
const host = String(u.hostname || "").toLowerCase();
|
||||
const isNcue = host === "ncue.net" || host.endsWith(".ncue.net");
|
||||
const parts = u.pathname.split("/").filter(Boolean);
|
||||
if (isNcue && parts.length) return `${u.origin}/${parts[0]}/favicon.ico`;
|
||||
return `${u.origin}/favicon.ico`;
|
||||
} catch {
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user