fix pagination

This commit is contained in:
2026-07-26 22:09:44 +02:00
parent a3148848f2
commit 8518e87c8d
2 changed files with 8 additions and 7 deletions

View File

@@ -457,8 +457,8 @@ process.on('uncaughtException', err => {
// Encourage connection reuse — helps external tools like ShareX avoid repeated TCP/TLS handshakes
res.setHeader('Connection', 'keep-alive');
// Tor Onion-Location header: advertises .onion service counterpart to Tor Browser users
if (cfg.main.onion && !req.headers['host']?.endsWith('.onion')) {
// Tor Onion-Location header: advertises .onion service counterpart to Tor Browser users when enabled
if (cfg.websrv?.enable_tor_hs !== false && cfg.main?.onion && !req.headers['host']?.endsWith('.onion')) {
const p = req.url?.pathname || '/';
const s = req.url?.search || '';
const onionHost = cfg.main.onion.replace(/\/+$/, '');