pkg/cloud/api/server.go #30

Closed
opened 2026-03-28 04:16:11 +00:00 by mfreeman451 · 1 comment
Owner

Imported from GitHub.

Original GitHub issue: #67
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/67
Original created: 2025-01-20T03:35:06Z


  • Error Handling: The error handling in some API handlers could be improved. For example, in getNode(), it would be better to return a 404 status code if the node is not found.
  • CORS: The CORS middleware allows all origins (*). For production, this should be restricted to specific origins.
  • Data Validation: The API could benefit from input validation to prevent invalid requests.
  • Static Files: The code assumes that the static files are located in web/dist. This path could be made configurable.
  • getNodeIDs(): This function could be removed as it is only used in one place and the logic could be inlined.
Imported from GitHub. Original GitHub issue: #67 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/67 Original created: 2025-01-20T03:35:06Z --- - [ ] Error Handling: The error handling in some API handlers could be improved. For example, in getNode(), it would be better to return a 404 status code if the node is not found. - [ ] CORS: The CORS middleware allows all origins (*). For production, this should be restricted to specific origins. - [ ] Data Validation: The API could benefit from input validation to prevent invalid requests. - [ ] Static Files: The code assumes that the static files are located in web/dist. This path could be made configurable. - [ ] getNodeIDs(): This function could be removed as it is only used in one place and the logic could be inlined.
Author
Owner

Imported GitHub comment.

Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/67#issuecomment-2608606897
Original created: 2025-01-23T00:55:08Z


closing, will re-open after next code-review

Imported GitHub comment. Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/issues/67#issuecomment-2608606897 Original created: 2025-01-23T00:55:08Z --- closing, will re-open after next code-review
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar#30
No description provided.