Skip to content

Serve POST /hardware only when explicitly enabled - #22

Merged
jim-toth merged 1 commit into
masterfrom
hardware-route-opt-in
Nov 7, 2026
Merged

jim-toth merged 1 commit into
masterfrom
hardware-route-opt-in

Conversation

@jim-toth

@jim-toth jim-toth commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Summary

POST /hardware is now off unless HARDWARE_ENDPOINT_ENABLED=true. When it is off, the route is not registered, so it answers the standard not found page and nothing reaches Onionoo.

Changes

  • HARDWARE_ENDPOINT_ENABLED: true or false, default false. Any other value stops the service at startup.
  • startServer takes hardwareEnabled, default false, and the startup log reports it.
  • README environment and route tables.
  • Tests: the default answers 404 without calling Onionoo, the existing hardware tests run with the endpoint on, and the config accepts only true or false.

The stage and live jobspecs do not set the variable, so the endpoint is off in both once a build with this change is deployed.

Verified

  • bun run check passes locally: typecheck, 259 pass, 1 skip.

@jim-toth
jim-toth merged commit e0a9a96 into master Nov 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant