File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -2262,6 +2262,10 @@ var directives = map[string][]uint{
22622262 ngxHTTPMainConf | ngxHTTPSrvConf | ngxHTTPLocConf | ngxConfTake2 ,
22632263 ngxStreamMainConf | ngxStreamSrvConf | ngxConfTake2 ,
22642264 },
2265+ "js_shared_dict_zone" : {
2266+ ngxHTTPMainConf | ngxConf1More ,
2267+ ngxStreamMainConf | ngxConf1More ,
2268+ },
22652269 "js_var" : {
22662270 ngxHTTPMainConf | ngxHTTPSrvConf | ngxHTTPLocConf | ngxConfTake12 ,
22672271 ngxStreamMainConf | ngxStreamSrvConf | ngxConfTake12 ,
Original file line number Diff line number Diff line change @@ -261,6 +261,33 @@ func TestAnalyze_njs(t *testing.T) {
261261 blockCtx {"stream" },
262262 true ,
263263 },
264+ "js_shared_dict_zone in http context ok" : {
265+ & Directive {
266+ Directive : "js_shared_dict_zone" ,
267+ Args : []string {"zone=foo:1M" },
268+ Line : 5 ,
269+ },
270+ blockCtx {"http" },
271+ false ,
272+ },
273+ "js_shared_dict_zone in stream context ok" : {
274+ & Directive {
275+ Directive : "js_shared_dict_zone" ,
276+ Args : []string {"zone=foo:1M" },
277+ Line : 5 ,
278+ },
279+ blockCtx {"stream" },
280+ false ,
281+ },
282+ "js_shared_dict_zone not ok" : {
283+ & Directive {
284+ Directive : "js_shared_dict_zone" ,
285+ Args : []string {"zone=foo:1M" },
286+ Line : 5 ,
287+ },
288+ blockCtx {"http" , "location" },
289+ true ,
290+ },
264291 }
265292
266293 for name , tc := range testcases {
You can’t perform that action at this time.
0 commit comments