mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 16:25:33 +01:00
fixes cookie_prefix for development setups
This commit is contained in:
parent
48796e6961
commit
35dcc54dc8
1 changed files with 4 additions and 2 deletions
|
|
@ -17,8 +17,10 @@ export class CsrfInterceptor implements HttpInterceptor {
|
|||
}
|
||||
|
||||
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
|
||||
|
||||
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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue