Persist hub auth for proxied LuCI
This commit is contained in:
1 parent
e8bca9eddb
commit
77715522e2
1 file changed
+8
-2
@@ -536,7 +536,7 @@ function render(list) {{
|
|||||||
const model = (r.status && (r.status.model || r.status.board)) || 'OpenWrt';
|
const model = (r.status && (r.status.model || r.status.board)) || 'OpenWrt';
|
||||||
const release = (r.status && r.status.release) || 'waiting heartbeat';
|
const release = (r.status && r.status.release) || 'waiting heartbeat';
|
||||||
const xray = (r.status && r.status.xray) || 'unknown';
|
const xray = (r.status && r.status.xray) || 'unknown';
|
||||||
const access = r.public_url || (r.access_url + '?' + tokenParam());
|
const access = r.public_url || r.access_url;
|
||||||
const tags = [
|
const tags = [
|
||||||
isMain ? 'главный' : 'node',
|
isMain ? 'главный' : 'node',
|
||||||
r.entry_port ? 'entry ' + r.entry_port : '',
|
r.entry_port ? 'entry ' + r.entry_port : '',
|
||||||
@@ -868,7 +868,13 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
resp_headers.append((key, value))
|
resp_headers.append((key, value))
|
||||||
if should_rewrite_body(content_type):
|
if should_rewrite_body(content_type):
|
||||||
resp_body = rewrite_html(resp_body, prefix)
|
resp_body = rewrite_html(resp_body, prefix)
|
||||||
self.send_bytes(resp.status, resp_body, content_type or "application/octet-stream", resp_headers)
|
self.send_bytes(
|
||||||
|
resp.status,
|
||||||
|
resp_body,
|
||||||
|
content_type or "application/octet-stream",
|
||||||
|
resp_headers,
|
||||||
|
set_cookie=self.admin_cookie_needed(),
|
||||||
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
self.send_text(502, f"proxy error: {exc}")
|
self.send_text(502, f"proxy error: {exc}")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user