title: URL Redirection to Untrusted Site
body: <p>I have below code in service.ts file and VeraCode code scan fails</p>
  <p>Flaws by CWE ID:
  URL Redirection to Untrusted Site ('Open Redirect') (CWE ID 601)(16 flaws)
  Description
  A web application accepts a untrusted input that specifies a link to an external site, and uses that link to generate a redirect. This enables phishing attacks.</p>
  <p>Please help me to fix this</p>
  <p>Service.ts:</p>
  <pre><code>public exportReviews(searchReviewData: SurveillanceReviewSearchViewModel): Observable&lt;SurveillanceReviewSearchViewModel&gt; {
      this._urlSurveillanceDetails = this.baseHref +&quot;/ReviewProfile/ExportReviews&quot;;
      const headers: HttpHeaders = new HttpHeaders();
      headers.append('Content-Type', 'application/json');
      return this.http.post&lt;SurveillanceReviewSearchViewModel&gt;(this._urlSurveillanceDetails, searchReviewData, { headers: headers }); // flaw identified on this line
    }
  
  public getReviewsBySearchSessionId(searchsessionId): Observable&lt;SurveillanceReviewSearchViewModel&gt; {
      this._urlSurveillanceDetails = this.baseHref + &quot;/ReviewProfile/SearchReviewsBySessionId&quot; + '?searchsessionId=' + searchsessionId;
      var headers = new HttpHeaders();
      headers.append('Content-Type', 'application/json');
      this._urlSurveillanceDetails = this.sanitizer.sanitize(SecurityContext.RESOURCE_URL, this.sanitizer.bypassSecurityTrustResourceUrl(this._urlSurveillanceDetails));
      return this.http.post&lt;SurveillanceReviewSearchViewModel&gt;(this._urlSurveillanceDetails, headers); // flaw identified on this line
    }
  </code></pre>