diff --git a/src/ngx_rewrite_options.cc b/src/ngx_rewrite_options.cc index 40d1bd1f6..c28f09916 100644 --- a/src/ngx_rewrite_options.cc +++ b/src/ngx_rewrite_options.cc @@ -276,10 +276,15 @@ const char* NgxRewriteOptions::ParseAndSetOptions( ScriptLine* script_line; script_line = NULL; - // Only allow script variable support for LoadFromFile for now. // Note that LoadFromFile should not be scriptable on wildcard hosts, // as browsers might be able to manipulate its natural use-case: $http_host. - if (!StringCaseStartsWith(directive, "LoadFromFile")) { + if (!StringCaseStartsWith(directive, "LoadFromFile") && + !StringCaseEqual(directive, "EnableFilters") && + !StringCaseEqual(directive, "DisableFilters") && + !StringCaseEqual(directive, "DownstreamCachePurgeLocationPrefix") && + !StringCaseEqual(directive, "DownstreamCachePurgeMethod") && + !StringCaseEqual(directive, + "DownstreamCacheRewrittenPercentageThreshold")) { compile_scripts = false; }