feat(webui): source trustProxy from runtime config (env still overrides)
Move the trust-proxy/client-ip resolver from a module-level direct read of SNOWLUMA_WEBUI_TRUST_PROXY into initWebUI, fed by runtime.json's trustProxy (loadRuntimeConfig already merges the env override on top). Default '' parses identically to the old undefined (trust socket peer only), so behavior is unchanged when unset.
This commit is contained in:
2 files changed
+9
-9
No files matched your search
@@ -51,6 +51,7 @@ async function main() {
|
||||
await initWebUI(runtimeConfig.webuiPort || 5099, oneBotManager, hookManager, notificationManager, {
|
||||
host: runtimeConfig.webuiHost,
|
||||
tlsEnabled: runtimeConfig.webuiTls?.enabled,
|
||||
trustProxy: runtimeConfig.trustProxy,
|
||||
});
|
||||
} catch (err) {
|
||||
log.error('Failed to start WebUI: ', err);
|
||||
|
||||
Reference in new issue
Block a user