Allow form data through without JSON header
This commit is contained in:
parent
f28ab24634
commit
5748f762e9
@ -21,9 +21,9 @@ export class ApiInterceptor implements HttpInterceptor {
|
||||
constructor(private router: Router) {}
|
||||
|
||||
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
const headers = {
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
const headers = (request.body instanceof FormData)
|
||||
? { }
|
||||
: { 'Content-Type': 'application/json' };
|
||||
const token = sessionStorage.getItem(this.JWT_KEY);
|
||||
|
||||
if (token !== null) {
|
||||
|
||||
Reference in New Issue
Block a user