opencode-studio-server 1.14.3 → 1.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/proxy-manager.js +7 -1
package/package.json
CHANGED
package/proxy-manager.js
CHANGED
|
@@ -55,6 +55,7 @@ const loadProxyConfig = () => {
|
|
|
55
55
|
const defaultConfig = {
|
|
56
56
|
port: 8317,
|
|
57
57
|
"auth-dir": PROXY_AUTH_DIR,
|
|
58
|
+
"management-key": "",
|
|
58
59
|
routing: { strategy: "round-robin" },
|
|
59
60
|
"quota-exceeded": {
|
|
60
61
|
"switch-project": true,
|
|
@@ -68,7 +69,12 @@ const loadProxyConfig = () => {
|
|
|
68
69
|
|
|
69
70
|
try {
|
|
70
71
|
const content = fs.readFileSync(PROXY_CONFIG_FILE, 'utf8');
|
|
71
|
-
|
|
72
|
+
const config = yaml.load(content);
|
|
73
|
+
if (config && config['management-key'] === undefined) {
|
|
74
|
+
config['management-key'] = "";
|
|
75
|
+
saveProxyConfig(config);
|
|
76
|
+
}
|
|
77
|
+
return config;
|
|
72
78
|
} catch (e) {
|
|
73
79
|
console.error("Failed to load proxy config:", e);
|
|
74
80
|
return {};
|