diff --git a/src-ui/src/app/interceptors/csrf.interceptor.ts b/src-ui/src/app/interceptors/csrf.interceptor.ts index 2ef03dc56..2c654aa36 100644 --- a/src-ui/src/app/interceptors/csrf.interceptor.ts +++ b/src-ui/src/app/interceptors/csrf.interceptor.ts @@ -17,8 +17,10 @@ export class CsrfInterceptor implements HttpInterceptor { } intercept(request: HttpRequest, next: HttpHandler): Observable> { - - let prefix = this.meta.getTag('name=cookie_prefix').content + let prefix = "" + if (this.meta.getTag('name=cookie_prefix')) { + prefix = this.meta.getTag('name=cookie_prefix').content + } let csrfToken = this.cookieService.get(`${prefix?prefix:''}csrftoken`) if (csrfToken) { request = request.clone({