Closed rskbansal closed 1 year ago
@thornjad
@rskbansal not sure we want an http-server writing files. What's the motivation for the change?
A robots.txt
file shall be physically present on the server, that's what it is meant to be
file shall be physically present
but why? For the user it's only important that the response for localhost/robots.txt contains the data, not that the file exists. The current implementation looks fine (except for the === true
check mentioned in #825)
A
robots.txt
file shall be physically present on the server, that's what it is meant to be
If the file needs to be physically present for your use case, I'd recommend generating it prior to hosting and just not using the --robots
option.
@zbynek thinks for connecting to #825. That does need a fix.
Description
Previously, the code was written so as to return text data when localhost/robots.txt is visited by providing the
-r
or the--robots
argument. Now, if the above mentioned arguments are passed, it creates a robots.txt file in the root directory of the server (either./
or./public
).Relevant issues
Fixes #825
Contributor checklist
--help
outputmaster
branchMaintainer checklist