Commit Graph
9 Commits
Author SHA1 Message Date
Denozordec a52dff4944 Enhance API path normalization and configuration validation
Publish telemt-api gateway Docker image / test (push) Successful in 25s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m14s
- Introduced a new function to normalize request URL paths, collapsing duplicate slashes and clearing raw paths to ensure correct routing in the reverse proxy.
- Updated the gateway to utilize the normalization function for API requests, improving routing consistency.
- Trimmed whitespace from server configuration fields in the validation process to prevent potential issues with malformed URLs.
- Enhanced documentation in GATEWAY_RUN.md to clarify the importance of proper URL formatting and configuration.
2026-03-30 11:29:58 +07:00
Denozordec 368473de59 Enhance API routing and testing for user endpoints
Publish telemt-api gateway Docker image / test (push) Successful in 24s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 1m52s
- Updated the reverse proxy to redirect `GET` requests for `/api/{alias}/users` to `/v1/stats/users`, ensuring compatibility with Telemt builds that handle these requests differently.
- Added tests to verify that `GET` and `HEAD` requests to `/api/{alias}/users` are correctly rewritten, while `POST` requests and user-specific retrievals remain unchanged.
- Improved documentation in GATEWAY_RUN.md to clarify the behavior of the API routing and the importance of using the correct base URL.
2026-03-30 11:18:36 +07:00
Denozordec 89638d29bb Improve URL assertion logic in reverse proxy tests. Updated assertSameURL function in reverse_test.go to handle nil URLs and enhance comparison logic, ensuring more accurate URL mismatch reporting and better test reliability.
Publish telemt-api gateway Docker image / test (push) Successful in 29s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 1m25s
2026-03-30 00:36:50 +07:00
Denozordec 0dfe14b347 Refactor reverse proxy tests to improve path rewriting assertions. Updated reverse_test.go to introduce a captureTransport for validating outgoing requests and added new tests for director path rewrites, enhancing test reliability and coverage for nested API routes.
Publish telemt-api gateway Docker image / test (push) Failing after 30s
Publish telemt-api gateway Docker image / build-and-push (push) Has been skipped
2026-03-30 00:34:37 +07:00
Denozordec 5934d059a4 Refactor reverse proxy tests to utilize context-aware requests. Updated reverse_test.go to create HTTP requests using context, improving test reliability and aligning with best practices for request handling. This change ensures that tests are more robust and less prone to issues related to request context.
Publish telemt-api gateway Docker image / test (push) Failing after 32s
Publish telemt-api gateway Docker image / build-and-push (push) Has been skipped
2026-03-30 00:30:01 +07:00
Denozordec fba3302079 Update reverse proxy tests to use absolute URLs for requests. Modified reverse_test.go to ensure that requests are constructed with the server's URL, preventing issues with the default "example.com" host in httptest. This change enhances the reliability of the tests by ensuring correct request handling.
Publish telemt-api gateway Docker image / test (push) Failing after 26s
Publish telemt-api gateway Docker image / build-and-push (push) Has been skipped
2026-03-30 00:27:44 +07:00
Denozordec 5a9b402220 Refactor reverse proxy path handling and enhance documentation. Updated reverse.go to improve upstream URL construction and added a new test for nested API routes in reverse_test.go. Revised GATEWAY_RUN.md to clarify API path behavior and configuration requirements for Nginx. Adjusted comments in config.example.yaml for better understanding of HTTPS and API prefix usage.
Publish telemt-api gateway Docker image / test (push) Failing after 36s
Publish telemt-api gateway Docker image / build-and-push (push) Has been skipped
2026-03-30 00:21:16 +07:00
Denozordec 16b1d8148d Refactor reverse proxy to support API base path and update example configuration. Changed base URLs in config.example.yaml to use HTTPS and the new /api/ prefix. Enhanced reverse proxy logic in reverse.go to build upstream paths correctly and added a new test for path rewriting with the API base path in reverse_test.go.
Publish telemt-api gateway Docker image / test (push) Successful in 32s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 1m40s
2026-03-30 00:04:45 +07:00
Denozordec 91f289c647 Init
ci / test (push) Successful in 1m15s
ci / docker (push) Successful in 1m8s
2026-03-29 22:51:02 +07:00