Serve Hesychia crawler files as static text instead of the app shell.
Exact locations return robots.txt, sitemap.xml, and llms.txt, or 404. Closes #43. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7f570b40a2
commit
dce0879e62
2 files changed
+18
No files matched your search
@@ -30,6 +30,22 @@ server {
|
||||
root {{ (app_catalog[a.name].webroot_pattern | default(web_static_root ~ '/{env}_' ~ a.name)) | replace('{env}', a.env) }};
|
||||
index index.html;
|
||||
|
||||
{% if app_catalog[a.name].exact_root_files | default(false) %}
|
||||
# Crawlers must get these files, never the SPA index.html fallback.
|
||||
location = /robots.txt {
|
||||
default_type text/plain;
|
||||
try_files /robots.txt =404;
|
||||
}
|
||||
location = /sitemap.xml {
|
||||
default_type application/xml;
|
||||
try_files /sitemap.xml =404;
|
||||
}
|
||||
location = /llms.txt {
|
||||
default_type text/plain;
|
||||
try_files /llms.txt =404;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if app_catalog[a.name].error_page_404 | default('') %}
|
||||
error_page 404 {{ app_catalog[a.name].error_page_404 }};
|
||||
|
||||
|
||||
Reference in new issue
Block a user