mirror of https://github.com/yandex/gixy
Exclude CR from HTTP Request splitting
parent
902e739106
commit
2c44989f4a
|
@ -28,11 +28,12 @@ class http_splitting(Plugin):
|
||||||
if not value:
|
if not value:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
server_side = directive.name.startswith('proxy_')
|
||||||
for var in compile_script(value):
|
for var in compile_script(value):
|
||||||
char = ''
|
char = ''
|
||||||
if var.can_contain('\n'):
|
if var.can_contain('\n'):
|
||||||
char = '\\n'
|
char = '\\n'
|
||||||
elif var.can_contain('\r'):
|
elif not server_side and var.can_contain('\r'):
|
||||||
char = '\\r'
|
char = '\\r'
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
location ~* ^/test/(.*) {
|
||||||
|
proxy_pass http://10.10.10.10/$1;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
location ~* ^/test/([^/]+)/ {
|
||||||
|
proxy_pass http://10.10.10.10/$1;
|
||||||
|
}
|
Loading…
Reference in New Issue