I'm using a staticText route for my robots.txt in TYPO3 v10 (with default .htaccess file). The Text is delivered as expected, but the StatusCode in the Header is 404. I have no Idea how I can fix that, since there's no option in the staticText route to set the statusCode.
This is my code for the route (like described in the docs: https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/ApiOverview/SiteHandling/StaticRoutes.html):
routes:
-
route: robots.txt
type: staticText
content: |
Sitemap: https://example.com/sitemap.xml
User-agent: *
Allow: /
Disallow: /forbidden/