Skip to content

Commit

Permalink
Include user-agent in frontend-log
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksson-daniel committed Nov 28, 2024
1 parent 6f2ad80 commit c5d6d5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/logging/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class FrontendLogger {
token_expires: this.tokenExpiresAt,
session_ends: this.sessionEndsAt,
is_logged_in: this.tokenExpiresAt !== undefined,
user_agent: navigator.userAgent,
};
};

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/logging/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export interface BaseEventData {
* @example `/nb/klage/1234/begrunnelse`
* */
route: string;
/** User agent string. */
user_agent: string;
}

interface CommonEventData {
Expand Down

0 comments on commit c5d6d5f

Please sign in to comment.