Skip to content

0.1.7

Compare
Choose a tag to compare
@github-actions github-actions released this 20 Jun 13:06
· 20 commits to main since this release
8d34024
Fix(GPX-696): Add support for labels endpoint (#56)

Improve query enforcement and error handling in proxy server

1. Added 'log_tokens' attribute in the config file, defaulting to false. This controls whether request tokens should be logged.
2. Improved the query enforcement in 'promqlEnforcer' function. Now, it also checks if the query is empty and sets it according to the 'allowedTenantLabels'.
3. Numerous changes were made in the 'reverseProxy' function to better handle requests and errors:
   - Removed the requirement for 'X-Plugin-Id' header, instead using URL path to differentiate between Thanos and Loki.
   + Added checks for '/api/v1/label' and '/api/v1/series' in the URL path.
   + Refactored error handling into two separate functions, one for standard error messages and another for custom messages.
   + Improved request logging to include method, URL, header, and body information. If 'log_tokens' is set to false, sensitive information is redacted.
   + Added support for handling POST requests and their bodies. The body query is also enforced using the 'enforceFunc' function.
4. Updated unit tests to reflect these changes.