<html>
  <head>
    <meta content="text/html; charset=KOI8-R" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Дык они ж вроде только с ответом работают -
    <meta http-equiv="content-type" content="text/html; charset=KOI8-R">
    allows replacing source string(regular expression or fixed) in the
    nginx response with destination string<br>
    то есть nginx уже получил ответ и готов его отослать клиенту, а тут
    только пришел запрос и его надо перенаправить на дургой адрес, а
    только потом придет ответ.<br>
    <br>
    06.03.2012 15:13, Alexey V. Karagodov пишет:
    <blockquote
      cite="mid:DA6A499C-CAC4-47F3-8ECC-9FF5F0C0A201@karagodov.name"
      type="cite">из разряда грязных хаков - <a moz-do-not-send="true"
        href="http://wiki.nginx.org/HttpSubsModule">http://wiki.nginx.org/HttpSubsModule</a>
      или <a moz-do-not-send="true"
        href="http://wiki.nginx.org/HttpSubModule">http://wiki.nginx.org/HttpSubModule</a> 
      <div>что больше подойдёт </div>
      <div>Subs умеет работать с регулярками </div>
      <div><br>
        <div><br>
          <div>
            <div>On 06.03.2012, at 12:09, Igor Vavrjin wrote:</div>
            <br class="Apple-interchange-newline">
            <blockquote type="cite">
              <meta content="text/html; charset=KOI8-R"
                http-equiv="Content-Type">
              <div bgcolor="#FFFFFF" text="#000000"> Таким образом
                заменится весь заголовок Cookie , а надо удалить (или
                послать пустое) только конкретное значение одной из кук.<br>
                Теоретически  если бы можно было сделать некий
                preg_replace на $http_cookie с заменой всех ненужных кук
                на пустые строчки, а потом послать результат как
                proxy_set_header Cookie $clear_cookies; но что-то не
                понятно как эту замену сделать, если есть мысли как это
                реализовать - буду премного благодарен!<br>
                <br>
                06.03.2012 14:58, <a moz-do-not-send="true"
                  href="http://SaveFrom.net">SaveFrom.net</a> пишет:
                <blockquote
cite="mid:CA+uEM9NVRzrsRR9zPvZjktfMWmXABFLGzBFxaxT-YuM621Zp8w@mail.gmail.com"
                  type="cite">
                  <div>Привтствую. <br>
                  </div>
                  <div><a moz-do-not-send="true"
href="http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_set_header">http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_set_header</a></div>
                  <div><br>
                  </div>
                  <div>Как-то так: </div>
                  <br>
                  <div class="gmail_quote">6 марта 2012 г. 14:48
                    пользователь Igor Vavrjin <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:igor.vavrjin@gmail.com">igor.vavrjin@gmail.com</a>></span>
                    написал:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div class="im">server {<br>
                          listen *:80;<br>
                          server_name <a moz-do-not-send="true"
                          href="http://site.com/" target="_blank">site.com</a>;<br>
                        <br>
                          location / {<br>
                              # Как-то подменяем присланные куки и
                        отправляем уже измененные<br>
                      </div>
                         - set $cookie_test 123;# вот так не работает,
                      то есть кука не шлется<br>
                         - set $cookie_test =123;# так тоже не работает</blockquote>
                    <div>       + proxy_set_header Cookie 123;      </div>
                    <div> </div>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div class="im"><br>
                              proxy_pass        <a
                          moz-do-not-send="true"
                          href="http://need_address/" target="_blank">http://need_address</a>;<br>
                              proxy_set_header  Host       $host;<br>
                              proxy_set_header  X-Real-IP  $remote_addr;<br>
                          }<br>
                        }<br>
                        <br>
                      </div>
                      nginx version: nginx/1.0.5<br>
                      <br>
                      06.03.2012 14:02, Aleksandr Sytar пишет:
                      <div class="HOEnZb">
                        <div class="h5"><br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex"> 6 марта 2012
                            г. 10:27 пользователь Igor Vavrjin<br>
                            <<a moz-do-not-send="true"
                              href="mailto:igor.vavrjin@gmail.com"
                              target="_blank">igor.vavrjin@gmail.com</a>>

                             написал:<br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex"> Не
                              подскажите можно ли средствами nginx
                              изменить содержимое заголовка Cookie<br>
                              при проксировании?<br>
                              <br>
                              Идея такая:<br>
                              поднят nginx и на него идут запросы.
                              Пример пришедшего заголовка:<br>
                              Cookie: verySecretCookie=password;
                              __utma=xxx;<br>
                              <br>
                              Так вот хотелось бы чтобы nginx переслал
                              запрос на другой сервер но вот с<br>
                              таким заголовком:<br>
                              Cookie:  __utma=xxx;<br>
                            </blockquote>
                            <a moz-do-not-send="true"
                              href="http://nginx.org/ru/docs/http/ngx_http_core_module.html#variables"
                              target="_blank">http://nginx.org/ru/docs/http/ngx_http_core_module.html#variables</a><br>
                            <br>
                            set $cookie_имя = значение;<br>
                            <br>
                            Как-то так<br>
                            <br>
                            <blockquote class="gmail_quote"
                              style="margin:0 0 0 .8ex;border-left:1px
                              #ccc solid;padding-left:1ex"> Пример
                              конфигурации:<br>
                              server {<br>
                                 listen *:80;<br>
                                 server_name <a moz-do-not-send="true"
                                href="http://site.com/" target="_blank">site.com</a>;<br>
                              <br>
                                 location / {<br>
                                     # Как-то подменяем присланные куки
                              и отправляем уже измененные<br>
                              <br>
                                     proxy_pass        <a
                                moz-do-not-send="true"
                                href="http://need_address/"
                                target="_blank">http://need_address</a>;<br>
                                     proxy_set_header  Host       $host;<br>
                                     proxy_set_header  X-Real-IP
                               $remote_addr;<br>
                                 }<br>
                              }<br>
                              <br>
                              Заранее спасибо.<br>
                              <br>
_______________________________________________<br>
                              nginx-ru mailing list<br>
                              <a moz-do-not-send="true"
                                href="mailto:nginx-ru@nginx.org"
                                target="_blank">nginx-ru@nginx.org</a><br>
                              <a moz-do-not-send="true"
                                href="http://mailman.nginx.org/mailman/listinfo/nginx-ru"
                                target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a><br>
                            </blockquote>
_______________________________________________<br>
                            nginx-ru mailing list<br>
                            <a moz-do-not-send="true"
                              href="mailto:nginx-ru@nginx.org"
                              target="_blank">nginx-ru@nginx.org</a><br>
                            <a moz-do-not-send="true"
                              href="http://mailman.nginx.org/mailman/listinfo/nginx-ru"
                              target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a><br>
                          </blockquote>
                          <br>
_______________________________________________<br>
                          nginx-ru mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:nginx-ru@nginx.org"
                            target="_blank">nginx-ru@nginx.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://mailman.nginx.org/mailman/listinfo/nginx-ru"
                            target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <br>
                  -- <br>
                  С уважением, <a moz-do-not-send="true"
                    href="http://SaveFrom.net">SaveFrom.net</a>.<br>
                  <br>
                  <br>
                  <fieldset class="mimeAttachmentHeader"></fieldset>
                  <br>
                  <pre wrap="">_______________________________________________
nginx-ru mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx-ru">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></pre>
                </blockquote>
                <br>
              </div>
              _______________________________________________<br>
              nginx-ru mailing list<br>
              <a moz-do-not-send="true" href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
              <a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx-ru">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
nginx-ru mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx-ru">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></pre>
    </blockquote>
    <br>
  </body>
</html>