Skip to content

Commit 7ccae2d

Browse files
committed
Allowed python directives in stream upstream{} scope.
1 parent 6103b69 commit 7ccae2d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/ngx_python.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static ngx_command_t ngx_python_commands[] = {
8888
NULL },
8989

9090
{ ngx_string("python_stack_size"),
91-
NGX_MAIN_CONF|NGX_CONF_TAKE1,
91+
NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
9292
ngx_conf_set_size_slot,
9393
0,
9494
offsetof(ngx_python_conf_t, stack_size),

src/ngx_stream_python_module.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,16 @@ static ngx_int_t ngx_stream_python_init(ngx_conf_t *cf);
5656
static ngx_command_t ngx_stream_python_commands[] = {
5757

5858
{ ngx_string("python"),
59-
NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
59+
NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_STREAM_UPS_CONF
60+
|NGX_CONF_TAKE1,
6061
ngx_python_set_slot,
6162
0,
6263
0,
6364
NULL },
6465

6566
{ ngx_string("python_include"),
66-
NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1,
67+
NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_STREAM_UPS_CONF
68+
|NGX_CONF_TAKE1,
6769
ngx_python_include_set_slot,
6870
0,
6971
0,

0 commit comments

Comments
 (0)