nrkno / sofie-core

Sofie Core: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
124 stars 40 forks source link

fix: API user actions log #1200

Closed jstarpl closed 3 weeks ago

jstarpl commented 4 weeks ago

About the Contributor

This is a bugfix posted on behalf of NRK

Type of Contribution

This is a:

Bug fix

Current Behavior

The UserActions Log UserEvent string is not very convenient. Also, the remoteAddress information is not extracted from Forwarded HTTP headers.

New Behavior

The logged remote address should match the "public" IP address of the callee. The UserActions Log userEvent should be more sensible (REST API, method, endpoint, host)

Testing

Affected areas

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 27.50000% with 29 lines in your changes missing coverage. Please review.

Project coverage is 58.06%. Comparing base (7a6d881) to head (f3ae3e6). Report is 73 commits behind head on release51.

Files Patch % Lines
meteor/server/api/rest/koa.ts 28.20% 28 Missing :warning:
meteor/server/api/rest/v1/index.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release51 #1200 +/- ## ============================================= - Coverage 58.07% 58.06% -0.02% ============================================= Files 519 522 +3 Lines 83783 84280 +497 Branches 4413 4390 -23 ============================================= + Hits 48660 48938 +278 - Misses 35093 35289 +196 - Partials 30 53 +23 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.