title: nginx write get query param to cookies
body: <p>how to write get query param if it exists to cookie? for example visiting <code>http://localhost:8000/page?click_id=14</code> should add header <code>Set-Cookie &quot;click_id=$arg_click_id;Path=/;Max-Age=216000&quot;;</code></p>
  <p>I've tried with if statement, but it breaks following <code>try_files</code>
  Map should have default, which isn't required in my case</p>