escape and quote the robotsTxt when templating
for now, we restrict the string length to 4096 since that is what nginx allows
This commit is contained in:
@@ -83,9 +83,9 @@ server {
|
||||
# Disable check to allow unlimited body sizes
|
||||
client_max_body_size 0;
|
||||
|
||||
<% if (robotsTxt) { %>
|
||||
<% if (robotsTxtQuoted) { %>
|
||||
location = /robots.txt {
|
||||
return 200 "<%= robotsTxt %>";
|
||||
return 200 <%- robotsTxtQuoted %>;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user