diff options
| -rw-r--r-- | nginx.conf | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -89,6 +89,14 @@ server { =404; } + # Direct .txt requests must bypass the curl/wget suffix map, otherwise a + # request for /robots.txt is looked up as /robots.txt.txt. No add_header + # here: mime.types supplies text/plain, `charset` supplies the charset, so + # the server-level security headers are inherited normally. + location ~* \.txt$ { + try_files $uri =404; + } + location / { try_files $uri$final_suffix |
