I trying to use all features of api-platform to test this solution. I don't want use the docker stack to understand the construction.
My test API is now created and useable.
https://ibb.co/hcjyrJ
Entrypoint: http://api.localhost
My problem is when i will install admin with the official tutorial.
https://ibb.co/gmK1dy
src/App.js
file with my entrypointhttps://ibb.co/nQKHJy
http://localhost:3000
https://ibb.co/niH7kd
When I try to access to admin : http://localhost:3000
, I have the message Unable to retrieve API documentation
.
I don't have any message in console. If I check my network tab, I can view the call to the API with the correct response.
https://ibb.co/injbdy
If you have any ideas.. I get them all !
I've found the solution at this problem.
In nelmio_cors.yaml
, you must add Link
in expose_headers
.
The file must look like as:
nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['*']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Content-Disposition', 'Content-Length', 'Link']
max_age: 3600
paths:
'^/': ~
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With