This commit is contained in:
Constantin Simonis 2025-03-06 12:52:15 +01:00
commit f547d05f64
No known key found for this signature in database
GPG key ID: 3878FF77C24AF4D2
8 changed files with 78 additions and 104 deletions

View file

@ -0,0 +1,9 @@
import { HttpInterceptorFn } from '@angular/common/http';
import { inject } from '@angular/core';
import { AuthService } from '../../service/auth.service';
export const httpInterceptor: HttpInterceptorFn = (req, next) => {
return next(req.clone({
setHeaders: {'Authorization': 'Bearer '+inject(AuthService).getAccessToken()},
}));
};