Comments (4)
It's still useful since the front controller is in web
. Besides if you're shipping an SPA with it, you may as well put all your front-end files in web instead of having two separate repository. If you don't need it it can always delete it :)
from api-platform.
Hi,
This is a rest of the the Symfony standard edition.
The web
folder is necessary for storing front controllers.
We can discuss about removing robots.txt
and favicon.ico
(this one must at least be replaced with the API Platform logo) but as crawlers will always request them, your logs will be full of 404 if they aren't present. It's considered best practice to always have those files.
Solution proposed by @theofidry can be useful for prototype and small apps but the recommended way of using API Platform is having separate git repositories (and servers) for the API and the frontend app.
from api-platform.
@dunglas 404 logging of these files can be easily prevented by your web server:
location ~* \/(favicon\.ico|robots\.txt) {
log_not_found off;
access_log off;
}
They don't make a problem.
What's the purpose of requesting these files in terms of an API? I haven't found any references about this topic, could you please share some?
from api-platform.
@codeskull they both don't have any use for the API. As @dunglas said crawlers will always request them, and even if you can disable logging for these files, it is not done by default. That's way it is considered good practice to keep them, at least for "distributed products". If you have your API installed, there is nothing preventing you to remove them and disable the logging for that.
from api-platform.
Related Issues (20)
- ValidationException returns stack trace instead of a list of violations
- API Platform GraphQL Operation Provider Error
- Serialization incomplete on JOINED inheritance subclass
- Cannot Start Environment with Docker-Compose on MacBook M1 Sonoma HOT 2
- api-platform.com domain does not resolve HOT 2
- Is it possible to use a filter feature separate from api-platform?
- Subresource Identifier
- Validation of path parameters HOT 1
- http instead https docs.jsonld
- Use of property class on APIResource Tag
- Custom Controller via POST accessible, not via GET-Collection
- UniqueEntity not fully working on PUT HOT 3
- Error "Unable to generate an IRI" if id has "." or ":"
- what is the best way to add current user information related to GetCollection request HOT 5
- SwaggerUI shows error: Unable to render this definition HOT 1
- Redundant @context field in OpenAPI for embedded JSON+LD resources
- denormalizationContext imbrique
- New Format : RSS feed
- Open up Paginator::$documents for read
- 502 status code in "Check PWA reachability" ci step
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-platform.