Skip to content
Snippets Groups Projects
Commit 06afc092 authored by Matthieu Benoist's avatar Matthieu Benoist
Browse files

Remove xsrf token from photon calls

parent bbbef0bb
Branches
Tags
1 merge request!160Remove xsrf token from photon calls
......@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { CookieService } from 'ngx-cookie-service';
import { APP_CONFIG } from '../../core/services/app-config.service';
import { PasswordResetComponent } from '../components';
@Injectable()
export class XSRFTokenInterceptor implements HttpInterceptor {
......@@ -17,7 +18,8 @@ export class XSRFTokenInterceptor implements HttpInterceptor {
let request = req;
if (xsrfToken) {
if (!new RegExp(`^${APP_CONFIG.backendUrls.datasetUsageStatistics}`).test(req.url)) {
if (!new RegExp(`^${APP_CONFIG.backendUrls.datasetUsageStatistics}`).test(req.url) &&
!new RegExp(`^${APP_CONFIG.backendUrls.geocoder}`).test(req.url) ) {
request = req.clone({
headers: req.headers.set('x-xsrf-token', xsrfToken),
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment