0
votes

I had to turn the parameters pagination_enabled to false in one of my entity in api-platform. Unfortunately when I do so I have an error in the client part :

1- [Error] Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.

2- [Error] Failed to load resource: Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin. (codeable_concepts, line 0)

3- [Error] Fetch API cannot load http://localhost:8080/codeable_concepts. Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.

How can I fix it ?

Thanks

1
Nobody can help me ? - Mathieu Schaaf

1 Answers

0
votes

I think that one part of the problem is that I tried to fetch a collection which is to big (300 entity with relations). When I put "pagination_items_per_page"=100 it works fine but when I put it at "pagination_items_per_page"=200 there is an error.

My question now is how to get the entire collection of more than 300 entity? Which parameter should I change in the api-platform configuration?