Merge pull request #74 from svc-design/codex/fix-ansible-template-error-for-openresty
Fix autoindex template logic
This commit is contained in:
commit
cce03cd597
@ -24,15 +24,15 @@ server {
|
||||
add_header Accept-Ranges bytes;
|
||||
try_files $uri $uri/ =404; # 保持原有 404 语义
|
||||
}
|
||||
{% elif %}
|
||||
{% elif autoindex_paths %}
|
||||
{% for path in autoindex_paths %}
|
||||
location {{ path }} {
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
autoindex_localtime on;
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
# 常见安装包直下读文件(大小写不敏感)
|
||||
# 这里无需 try_files,命中即直接读文件;减少一次磁盘判断
|
||||
|
||||
Loading…
Reference in New Issue
Block a user