0cb3256b2d
Adds middleware to restrict /api/admin/restart and /api/admin/shutdown to localhost-only access. This prevents DoS attacks when the worker service is bound to 0.0.0.0 for remote UI access. Implementation: - Created requireLocalhost middleware in middleware.ts - Applied to both admin endpoints - Checks client IP against localhost addresses (127.0.0.1, ::1, etc.) - Returns 403 Forbidden for non-localhost requests Addresses security concern raised in PR #368 with cleaner DRY approach. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>