diff --git a/src/index.mjs b/src/index.mjs index b9e024d..970015e 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -331,15 +331,6 @@ function buildGatePage(req) { '502: Bad Gateway', `${reqHost} | 502: Bad gateway` ); - // Inject Onion-Location meta tag into for Tor Browser compatibility - if (cfg.websrv?.enable_tor_hs !== false && cfg.main?.onion && req && req.headers && !req.headers['host']?.endsWith('.onion')) { - const p = req.url?.pathname || '/'; - const s = req.url?.search || ''; - const onionHost = cfg.main.onion.replace(/\/+$/, ''); - const onionUrl = `${onionHost}${p}${s}`; - html = html.replace('', `\n`); - } - html = html.replace('', gateLoginInjection + '\n'); return html; } @@ -1334,8 +1325,6 @@ process.on('uncaughtException', err => { show_mime_picker: cfg.websrv.show_mime_picker !== false, private_society: cfg.websrv.private_society || false, private_society_gate: cfg.websrv.private_society_gate || '', - onion: cfg.main.onion || '', - enable_tor_hs: cfg.websrv.enable_tor_hs !== false, show_content_warning: cfg.websrv.show_content_warning !== false, web_url_upload: !!cfg.websrv.web_url_upload, enable_youtube_upload: cfg.websrv.enable_youtube_upload !== false, diff --git a/views/snippets/header.html b/views/snippets/header.html index bb2e3e7..227cc98 100644 --- a/views/snippets/header.html +++ b/views/snippets/header.html @@ -2,7 +2,6 @@ - @if(enable_tor_hs && onion)@endif @if(typeof page_meta !== 'undefined' && page_meta.title){{ domain }} - {{ page_meta.title }}@elseif(typeof item !== 'undefined'){{ domain }} - {{ item.id }}@else{{ domain }}@endif