How to explicitly set samesite=None on a flask response : <p>Due to changes arriving in Chrome during July, I need to modify my app to explicitly provide the SameSite=None key value.  This is due to the RFC treating the absence of this setting in a more impacting way than if it is present but set to None.  </p>

<p>However on the set_cookie method, the samesite parameter is defaulted to None which results in it not being written into the set-cookie.  How can I force this into the set-cookie part of the response?</p>

<p>When I try to set the samesite=None with the following code</p>

<pre><code>resp.set_cookie('abcid', 'Hello', domain=request_data.domain, path='/', samesite=None, max_age=63072000) 
</code></pre>

<p>This does not show any SameSite detail in the returned set-cookie</p>

<blockquote>
  <p>abcid=Hello; Domain=.localhost; Expires=Tue, 29-Jun-2021 22:34:02 GMT; Max-Age=63072000; Path=/</p>
</blockquote>

<p>And if I try and explicitly set the value of Lax (which is one of the accepted values per rfc) as so</p>

<pre><code>resp.set_cookie('abcid', "Hello", domain=request_data.domain, path='/', samesite="Lax", max_age=63072000)
</code></pre>

<p>I get back the set-cookie which explicitly has the SameSite=Lax setting</p>

<blockquote>
  <p>abcid=Hello; Domain=.localhost; Expires=Tue, 29-Jun-2021 23:03:10 GMT; Max-Age=63072000; Path=/; SameSite=Lax</p>
</blockquote>

<p>I have tried None, "None", and "" but these either crash the application or omit the SameSite in the resultant response.</p>

<p>Any help would be gratefully received</p>
