mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-19 07:50:43 +01:00
Add http.MaxBytesReader to 16 additional handlers to prevent memory exhaustion attacks via oversized request bodies: - docker_agents.go: HandleReport (512KB), HandleCommandAck (8KB), HandleSetCustomDisplayName (8KB) - alerts.go: UpdateAlertConfig (64KB), BulkAcknowledgeAlerts (32KB), BulkClearAlerts (32KB) - config_handlers.go: HandleAddNode, HandleTestConnection, HandleUpdateNode, HandleTestNodeConfig (32KB each), HandleVerifyTemperatureSSH, HandleExportConfig, HandleDiscoverServers, HandleSetupScriptURL (8KB each), HandleImportConfig (1MB), HandleUpdateMockMode (16KB)
Internal API Package
This directory contains the API server implementation for Pulse.
Important Note About frontend-modern/
The frontend-modern/ subdirectory that appears here is:
- AUTO-GENERATED during builds
- NOT the source code - just a build artifact
- IN .gitignore - never committed
- REQUIRED BY GO - The embed directive needs it here
Frontend Development Location
👉 Edit frontend files at: /opt/pulse/frontend-modern/src/
Why This Structure?
Go's //go:embed directive has limitations:
- Cannot use
../paths to access parent directories - Cannot follow symbolic links
- Must embed files within the Go module
This is a known Go limitation and our structure works around it.