Mercurial > hg > nginx-tests
changeset 1585:bff287fbf347
Tests: added proxy_cookie_domain/path tests with "off" parameter.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 23 Jul 2020 12:17:39 +0300 |
parents | b4014b3e8495 |
children | e145509cc6eb |
files | proxy_cookie.t |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/proxy_cookie.t Thu Jul 23 12:16:41 2020 +0300 +++ b/proxy_cookie.t Thu Jul 23 12:17:39 2020 +0300 @@ -51,6 +51,13 @@ proxy_cookie_path /$server_name/ /new/$server_name/; proxy_cookie_path ~^/regex/(.+)$ /$1; proxy_cookie_path ~*^/caseless/(.+)$ /$1; + + location /off/ { + proxy_pass http://127.0.0.1:8081; + + proxy_cookie_domain off; + proxy_cookie_path off; + } } } @@ -73,7 +80,7 @@ EOF -$t->run()->plan(8); +$t->run()->plan(9); ############################################################################### @@ -100,6 +107,9 @@ is(http_get_set_cookie('/?domain=www.example.org&path=/path/test.html'), 'v=path=domain=; Domain=example.com; Path=/new/test.html', 'domain and path rewrite'); +is(http_get_set_cookie('/off/?domain=www.example.org&path=/path/test.html'), + 'v=path=domain=; Domain=www.example.org; Path=/path/test.html', + 'domain and path rewrite off'); ###############################################################################