chore: remove dev build tag and add auth debugging

This commit is contained in:
Pulse Monitor
2025-09-04 15:00:14 +00:00
parent 35f5de75bd
commit 810ec40ce1
3 changed files with 8 additions and 34 deletions
-31
View File
@@ -1,31 +0,0 @@
import { defineConfig } from 'vite';
import solid from 'vite-plugin-solid';
import path from 'path';
export default defineConfig({
plugins: [solid()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
port: 7655,
host: '0.0.0.0',
strictPort: true, // FAIL if port 7655 is not available
proxy: {
'/api': {
target: 'http://127.0.0.1:7656',
changeOrigin: true,
},
'/ws': {
target: 'ws://127.0.0.1:7656',
ws: true,
changeOrigin: true,
},
},
},
build: {
target: 'esnext',
},
});
+7 -2
View File
@@ -359,11 +359,16 @@ func Load() (*Config, error) {
log.Debug().Msg("API token exists without explicit enabled flag, assuming enabled for backwards compatibility")
}
// Check if auth is disabled
if disableAuth := os.Getenv("DISABLE_AUTH"); disableAuth != "" {
cfg.DisableAuth = disableAuth == "true" || disableAuth == "1"
disableAuthEnv := os.Getenv("DISABLE_AUTH")
log.Debug().Str("DISABLE_AUTH_ENV", disableAuthEnv).Msg("Checking DISABLE_AUTH environment variable")
if disableAuthEnv != "" {
cfg.DisableAuth = disableAuthEnv == "true" || disableAuthEnv == "1"
log.Debug().Bool("DisableAuth", cfg.DisableAuth).Msg("DisableAuth set from environment")
if cfg.DisableAuth {
log.Warn().Msg("⚠️ AUTHENTICATION DISABLED - Pulse is running without authentication!")
}
} else {
log.Debug().Bool("DisableAuth", cfg.DisableAuth).Msg("DISABLE_AUTH not set, DisableAuth remains")
}
// Load proxy authentication settings
+1 -1
View File
@@ -99,7 +99,7 @@ cd /opt/pulse
echo "Building backend (API-only mode for development)..."
# Always rebuild in dev mode to ensure we have the right build
echo "Building with PULSE_MOCK_MODE=${PULSE_MOCK_MODE}"
go build -tags "dev" -o pulse ./cmd/pulse
go build -o pulse ./cmd/pulse
# Export all PULSE_MOCK_* variables for the backend
export PULSE_MOCK_MODE PULSE_MOCK_NODES PULSE_MOCK_VMS_PER_NODE PULSE_MOCK_LXCS_PER_NODE PULSE_MOCK_RANDOM_METRICS PULSE_MOCK_STOPPED_PERCENT
# Export auth variables if set