Closed grindarius closed 5 months ago
Describe the bug The new GET /detections header does not return the Total-Items header from the API.
GET /detections
Total-Items
To Reproduce
curl -H "Authorization: Bearer <your token>" -v "https://staging-api.rfcx.org/detections?start=2015-01-01&end=2024-04-01&classifier_jobs=101&classifications=sciurus_carolinensis_simple_call_1&min_confidence=0.1&classifier_ids=3&limit=25&offset=0"
Expected behavior You should see in the logs that the Total-Items header is being returned from the API.
* schannel: failed to decrypt data, need more data < HTTP/1.1 200 OK < Access-Control-Allow-Origin: * < Content-Type: application/json; charset=utf-8 < Date: Tue, 16 Apr 2024 19:11:39 GMT < ETag: W/"17a2-30OnAwLlw0XaviilnNJOfm+ejrY" < Vary: Accept-Encoding < X-Powered-By: Express < X-Request-Id: cdfa5a5b7b62f3c27069f0af153efdec < Content-Length: 6050 < Connection: keep-alive < Total-Items: 12
Additional context The header is not being shown in the cURL logs
I suspect this happened because we did not set Access-Control-Expose-Headers before setting the Total-Items header.
Turns out it is just not being released. https://github.com/rfcx/rfcx-api/actions/runs/8717628848 I have checked the API and it works fine.
Describe the bug The new
GET /detections
header does not return theTotal-Items
header from the API.To Reproduce
Expected behavior You should see in the logs that the
Total-Items
header is being returned from the API.Additional context The header is not being shown in the cURL logs
I suspect this happened because we did not set Access-Control-Expose-Headers before setting the
Total-Items
header.