mirror of
https://github.com/woodchen-ink/random-api-go.git
synced 2025-07-18 13:52:02 +08:00
- Updated the metrics API endpoint from '/metrics' to '/api/metrics' for better organization. - Added data validation to ensure the metrics data received is an object, enhancing error handling. - Refactored the updateMetricsDisplay function to dynamically create metric items, improving the display of metrics. - Implemented HTML escaping for metric keys and values to prevent XSS vulnerabilities. - Cleared existing content in the metrics container before updating, ensuring a clean display.