El mago
El mago

Reputation: 11

apiplatform can't access public resources

My problem is simple, I just installed apiplatform with jwt authentification. Everything works perfectly on my local machine but when I try to deploy it on my server and I try to load the "api/docs" page, I get a 404 on every resources from the public folder "public/bundles/apiplatform".

I don't use docker at all (and I have no intention to), my question is simple :

why it does not include the public folder from apiplatformbundle?

What could be the solution to include it ?

Is there any configuration to deal with inside the api_platform.yml ?

I am completely stuck right now, any advice would be really helpful, thanks :)

docs:9 GET http://{myUrl}/bundles/apiplatform/style.css net::ERR_ABORTED 404 (Not Found)

docs:8 GET http://{myUrl}/bundles/apiplatform/swagger-ui/swagger-ui.css net::ERR_ABORTED 404 (Not Found)

etc...

Upvotes: 0

Views: 1338

Answers (2)

El mago
El mago

Reputation: 11

I got it !

That's not easy because no errors are shown !

before, I was using

use ApiPlatform\Core\Annotation\ApiResource;

But now, you have to use in Apilatform 2.7 and further :

use ApiPlatform\Metadata\ApiResource;

Upvotes: 0

El mago
El mago

Reputation: 11

Please anyone ? Still don't get anything on it. It would be very helpful because actually the documentation can't be access by the front-end's part to access the API.

Upvotes: 1

Related Questions