File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,11 @@ static ngx_int_t ngx_http_redirectionio_create_ctx_handler(ngx_http_request_t *r
168
168
ngx_http_redirectionio_ctx_t * ctx ;
169
169
ngx_http_redirectionio_conf_t * conf ;
170
170
171
+ // Disallow in sub request
172
+ if (r != r -> main ) {
173
+ return NGX_DECLINED ;
174
+ }
175
+
171
176
conf = ngx_http_get_module_loc_conf (r , ngx_http_redirectionio_module );
172
177
173
178
if (conf -> enable == NGX_HTTP_REDIRECTIONIO_OFF ) {
@@ -214,6 +219,11 @@ static ngx_int_t ngx_http_redirectionio_redirect_handler(ngx_http_request_t *r)
214
219
ngx_int_t status ;
215
220
unsigned short redirect_status_code ;
216
221
222
+ // Disallow in sub request
223
+ if (r != r -> main ) {
224
+ return NGX_DECLINED ;
225
+ }
226
+
217
227
conf = ngx_http_get_module_loc_conf (r , ngx_http_redirectionio_module );
218
228
219
229
if (conf -> enable == NGX_HTTP_REDIRECTIONIO_OFF ) {
@@ -298,6 +308,11 @@ static ngx_int_t ngx_http_redirectionio_log_handler(ngx_http_request_t *r) {
298
308
ngx_http_redirectionio_ctx_t * ctx ;
299
309
ngx_http_redirectionio_log_t * log ;
300
310
311
+ // Disallow in sub request
312
+ if (r != r -> main ) {
313
+ return NGX_DECLINED ;
314
+ }
315
+
301
316
conf = ngx_http_get_module_loc_conf (r , ngx_http_redirectionio_module );
302
317
303
318
if (conf -> enable == NGX_HTTP_REDIRECTIONIO_OFF ) {
You can’t perform that action at this time.
0 commit comments