Browse Source

Bugfix/undefined time zone in auth interceptor (#8181)

* Fix exception when time zone of browser unavailable

* Update changelog
pull/8185/merge
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
4921c001ba
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 11
      apps/client/src/app/core/auth.interceptor.ts

4
CHANGELOG.md

@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Hardened the validation of the date in the endpoint to create an account balance
- Upgraded `bootstrap` from version `4.6.2` to `5.3.8`
### Fixed
- Fixed an exception in the authentication interceptor when the time zone of the browser is not available
## 3.86.0 - 2026-10-13
### Added

11
apps/client/src/app/core/auth.interceptor.ts

@ -38,10 +38,13 @@ export class AuthInterceptor implements HttpInterceptor {
return next.handle(request);
}
let headers = request.headers.set(
HEADER_KEY_TIMEZONE,
Intl?.DateTimeFormat().resolvedOptions().timeZone
);
let headers = request.headers;
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
if (timezone) {
headers = headers.set(HEADER_KEY_TIMEZONE, timezone);
}
const token = this.tokenStorageService.getToken();

Loading…
Cancel
Save