cmu-delphi / www-epivis

An interactive tool for visualizing epidemiological time-series data.
http://delphi.cmu.edu/epivis/
MIT License
1 stars 3 forks source link

Make epivis API requests more visible #38

Open melange396 opened 4 months ago

melange396 commented 4 months ago

We dont have an easy way to distinguish epivis-originated API requests in our server logs, making it somewhat difficult to measure actual usage of epivis. We could prepend/append to or replace (im not sure right now which choice would be most appropriate) the User-Agent header with something epivis specific, or we could possibly do it via the Origin or Referer headers instead.

Current headers (for me) appear to be something like:

Origin: https://delphi.cmu.edu
Referer: https://delphi.cmu.edu/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
melange396 commented 4 months ago

As mentioned in https://github.com/cmu-delphi/delphi-epidata/issues/1386#issue-2125921086 , we may need to update our Referrer-Policy.

rzats commented 1 month ago

Currently a somewhat hacky way of tracking epivis requests is looking for API requests with years 3921 - 3924 as the upper date bound: https://github.com/cmu-delphi/www-epivis/pull/53#discussion_r1708608791

This is caused by a bug, though, and should be patched out once this issue is closed.