0

When I make a http get or fetch request using Angular 6 on a Apache PHP Server and the Content-Length is over 5000 characters I am getting these errors :

Access to XMLHttpRequest at 'http:/example.com/search/results/1' from origin 'http://angular.localhost:7483' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource


ERROR Error: Uncaught (in promise): Response with status: 0 for URL: null

but when the length is lower it doesn't show these errors.
Is this limit constant or maybe I can change it ?

The Content-Length I am refering to is the one on the image below


enter image description here

Typescript code snipet on angular :

this.http.get(
SearchV2 + 'results/' + queryParams.join("/"),
{
    withCredentials: true
})
.map(res => res.json())
.toPromise();
Lu Blue
  • 335
  • 3
  • 10

0 Answers0