title: SameSite cookie from flask not being added since we have an old version of Flask
body: <p>I have a flask app running on my server, we're using uwsgi.
  Flask version: 0.11.1</p>
  <p><strong>Problem</strong>: Cookies returned from our flask app do not contain SameSite=None; , I tried editing our flask config file by adding these:</p>
  <pre><code>SESSION_COOKIE_SECURE=True,
  SESSION_COOKIE_HTTPONLY=True,
  SESSION_COOKIE_SAMESITE='None'
  </code></pre>
  <p>but that didn't work since our version of flask does not support <code>SameSite</code>.</p>
  <p>In our nginx config:</p>
  <pre><code>server {
      ...
      uwsgi_pass &lt;local_ip&gt;;
      include uwsgi_params;
      proxy_cookie_path / &quot;/; SameSite=None; Secure&quot;;
  }
  </code></pre>
  <p><code>proxy_cookie_path</code> didn't work since we are using <code>uwsgi_pass</code> instead of nginx <code>proxy_pass</code>.</p>
  <p>Finally, the cookie in the response is handled by flask sessions, so I am not setting the value manually. Thus weren't able to use <code>response.set_cookie()</code></p>
  <p>I dug into the code of flask and have reached the <code>dump_cookie()</code> function where the <code>Set-Cookie</code> header is being added, but wasn't able to come up with a fix.</p>
  <p>Is there a way to edit the uwsgi cookie from the nginx config? Or to edit the cookie of Flask's session?</p>