mirror of
https://github.com/tugcantopaloglu/openclaw-dashboard.git
synced 2026-08-14 00:47:52 +00:00
Allow access for Tailscale IPs in HTTPS enforcement
This commit is contained in:
@@ -357,6 +357,7 @@ function httpsEnforcement(req, res) {
|
||||
if (process.env.DASHBOARD_ALLOW_HTTP === 'true') return true;
|
||||
const ip = getClientIP(req);
|
||||
if (isLocalhost(ip)) return true;
|
||||
if (isTailscaleIP(ip)) return true;
|
||||
if (req.socket.encrypted || req.headers['x-forwarded-proto'] === 'https') return true;
|
||||
setSecurityHeaders(res);
|
||||
res.writeHead(403, { 'Content-Type': 'text/plain' });
|
||||
|
||||
Reference in New Issue
Block a user