Commit 495e6c50 authored by Matthieu BENOIST's avatar Matthieu BENOIST
Browse files

Merge branch 'DOS0177823' into 'master'

Remove xsrf token from photon calls

See merge request !160
parents bbbef0bb 06afc092
Pipeline #21412 passed with stage
in 8 minutes and 10 seconds
......@@ -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),
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment