Skip to content

Commit a8896ac

Browse files
rcourtmanclaude
andcommitted
fix: handle self-signed SSL certificates in configuration
- Add allowSelfSignedCerts flag to test configuration endpoints - Automatically set ALLOW_SELF_SIGNED_CERT=true when saving config - Include self-signed cert settings in environment variable groups - This fixes SSL certificate verification errors with Proxmox servers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8fe4c0a commit a8896ac

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

server/configApi.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,17 @@ class ConfigApi {
4949
existingConfig.PROXMOX_PORT = config.proxmox.port || '8006';
5050
existingConfig.PROXMOX_TOKEN_ID = config.proxmox.tokenId;
5151
existingConfig.PROXMOX_TOKEN_SECRET = config.proxmox.tokenSecret;
52+
// Always allow self-signed certificates by default for Proxmox
53+
existingConfig.PROXMOX_ALLOW_SELF_SIGNED_CERT = 'true';
5254
}
5355

5456
if (config.pbs) {
5557
existingConfig.PBS_HOST = config.pbs.host;
5658
existingConfig.PBS_PORT = config.pbs.port || '8007';
5759
existingConfig.PBS_TOKEN_ID = config.pbs.tokenId;
5860
existingConfig.PBS_TOKEN_SECRET = config.pbs.tokenSecret;
61+
// Always allow self-signed certificates by default for PBS
62+
existingConfig.PBS_ALLOW_SELF_SIGNED_CERT = 'true';
5963
}
6064

6165
// Write back to .env file
@@ -84,7 +88,8 @@ class ConfigApi {
8488
port: parseInt(config.proxmox.port) || 8006,
8589
tokenId: config.proxmox.tokenId,
8690
tokenSecret: config.proxmox.tokenSecret,
87-
enabled: true
91+
enabled: true,
92+
allowSelfSignedCerts: true // Allow self-signed certificates for testing
8893
}];
8994

9095
const testPbsConfigs = config.pbs ? [{
@@ -93,7 +98,8 @@ class ConfigApi {
9398
host: config.pbs.host,
9499
port: parseInt(config.pbs.port) || 8007,
95100
tokenId: config.pbs.tokenId,
96-
tokenSecret: config.pbs.tokenSecret
101+
tokenSecret: config.pbs.tokenSecret,
102+
allowSelfSignedCerts: true // Allow self-signed certificates for testing
97103
}] : [];
98104

99105
// Try to initialize API clients with test config
@@ -163,8 +169,8 @@ class ConfigApi {
163169

164170
// Group related settings
165171
const groups = {
166-
'Proxmox VE Settings': ['PROXMOX_HOST', 'PROXMOX_PORT', 'PROXMOX_TOKEN_ID', 'PROXMOX_TOKEN_SECRET'],
167-
'Proxmox Backup Server Settings': ['PBS_HOST', 'PBS_PORT', 'PBS_TOKEN_ID', 'PBS_TOKEN_SECRET'],
172+
'Proxmox VE Settings': ['PROXMOX_HOST', 'PROXMOX_PORT', 'PROXMOX_TOKEN_ID', 'PROXMOX_TOKEN_SECRET', 'PROXMOX_ALLOW_SELF_SIGNED_CERT'],
173+
'Proxmox Backup Server Settings': ['PBS_HOST', 'PBS_PORT', 'PBS_TOKEN_ID', 'PBS_TOKEN_SECRET', 'PBS_ALLOW_SELF_SIGNED_CERT'],
168174
'Other Settings': [] // Will contain all other keys
169175
};
170176

0 commit comments

Comments
 (0)