Closed eecavanna closed 1 month ago
I will test this change locally now—to confirm putting a value of None
in that property of the dictionary doesn't break anything downstream.
I confirmed, locally (shown here), that requests that lack a User-Agent
header are now logged by the analytics middleware. I also confirmed that requests that have that header are also logged (as they were before).
Description
The changes on this branch make it so the analytics middleware no longer raises a
KeyError
when the incoming request lacks auser-agent
(case-insensitive) header.If someone wants the runtime to deny those requests, I propose that be done elsewhere (and explicitly documented).
Fixes #515.
Type of change
How Has This Been Tested?
I confirmed, locally (shown here), that requests that lack a
User-Agent
header are now logged by the analytics middleware. I also confirmed that requests that have the header are also logged (as they were before).Configuration Details: none
Checklist:
black nmdc_runtime/
?)docs/
and in https://github.com/microbiomedata/NMDC_documentation/?)make up-test && make test-run
)