@@ -53,6 +53,14 @@ static ngx_command_t ngx_http_redirectionio_commands[] = {
53
53
offsetof(ngx_http_redirectionio_conf_t , enable_logs ),
54
54
ngx_http_redirectionio_enable_state
55
55
},
56
+ {
57
+ ngx_string ("redirectionio_add_rule_ids_header" ),
58
+ NGX_HTTP_MAIN_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_SIF_CONF |NGX_HTTP_LOC_CONF |NGX_HTTP_LIF_CONF |NGX_CONF_TAKE1 ,
59
+ ngx_conf_set_enum_slot ,
60
+ NGX_HTTP_LOC_CONF_OFFSET ,
61
+ offsetof(ngx_http_redirectionio_conf_t , show_rule_ids ),
62
+ ngx_http_redirectionio_enable_state
63
+ },
56
64
{
57
65
ngx_string ("redirectionio_pass" ),
58
66
NGX_HTTP_MAIN_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_SIF_CONF |NGX_HTTP_LOC_CONF |NGX_HTTP_LIF_CONF |NGX_CONF_TAKE1 ,
@@ -61,6 +69,14 @@ static ngx_command_t ngx_http_redirectionio_commands[] = {
61
69
offsetof(ngx_http_redirectionio_conf_t , pass ),
62
70
NULL
63
71
},
72
+ {
73
+ ngx_string ("redirectionio_scheme" ),
74
+ NGX_HTTP_MAIN_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_SIF_CONF |NGX_HTTP_LOC_CONF |NGX_HTTP_LIF_CONF |NGX_CONF_TAKE1 ,
75
+ ngx_conf_set_str_slot ,
76
+ NGX_HTTP_LOC_CONF_OFFSET ,
77
+ offsetof(ngx_http_redirectionio_conf_t , scheme ),
78
+ NULL
79
+ },
64
80
ngx_null_command /* command termination */
65
81
};
66
82
@@ -321,6 +337,7 @@ static void *ngx_http_redirectionio_create_conf(ngx_conf_t *cf) {
321
337
322
338
conf -> enable = NGX_CONF_UNSET_UINT ;
323
339
conf -> enable_logs = NGX_CONF_UNSET_UINT ;
340
+ conf -> show_rule_ids = NGX_CONF_UNSET_UINT ;
324
341
325
342
return conf ;
326
343
}
@@ -330,7 +347,9 @@ static char *ngx_http_redirectionio_merge_conf(ngx_conf_t *cf, void *parent, voi
330
347
ngx_http_redirectionio_conf_t * conf = child ;
331
348
332
349
ngx_conf_merge_uint_value (conf -> enable_logs , prev -> enable_logs , NGX_HTTP_REDIRECTIONIO_ON );
350
+ ngx_conf_merge_uint_value (conf -> show_rule_ids , prev -> show_rule_ids , NGX_HTTP_REDIRECTIONIO_OFF );
333
351
ngx_conf_merge_str_value (conf -> project_key , prev -> project_key , "" );
352
+ ngx_conf_merge_str_value (conf -> scheme , prev -> scheme , "" );
334
353
335
354
if (conf -> pass .url .data == NULL ) {
336
355
if (prev -> pass .url .data ) {
0 commit comments