为了不将垃圾传递到后端,我对location
指令有一个严格的正则表达式。它看起来像这样:
location ^~ "/(some|stuff|more|bar|etc(-testing)?)/[a-zA-Z0-9]+/...(more|restrict).ext {
# other directives
}
我想以 80 个字符折叠线,有没有办法拆分配置?以下导致语法错误,但我正在寻找:
location ^~ "/(some|stuff|more|bar|etc(-testing)?)/[a-zA-Z0-9]+/"\
"...(more|restrict).ext" {
# results in a literal newline (%0A) being accepted
location ^~ "/(some|stuff|more|bar|etc(-testing)?)/[a-zA-Z0-9]+/
...(more|restrict).ext" {
我在文档中找不到提示(http://wiki.nginx.org/ConfigNotation也没有http://wiki.nginx.org/HttpCoreModule#location提到任何关于折叠线的内容)