title: Flask not getting cookies
body: <p>I'm making backend for my website and it requires flask setting cookies. When I set the cookies, it works fine, but when I try to get them with <code>request.cookies.get('name')</code> it returns None. I tried just returning <code>request.cookies</code> and all that was there was my GA cookies, not the one that I set. Am I doing something wrong? Here's my code:</p>
  <pre class="lang-py prettyprint-override"><code>@app.route(&quot;/setcookie&quot;, methods=[&quot;GET&quot;, &quot;POST&quot;])
  def setcookie():
      resp = make_response(render_template(&quot;index.html&quot;))
      resp.set_cookie(&quot;authToken&quot;, &quot;testestestestestestes&quot;, max_age=1)
      return resp
  
  @app.route(&quot;/getcookie&quot;, methods=[&quot;GET&quot; ,&quot;POST&quot;])
  def getcookie():
      return request.cookies
  </code></pre>
  <p>index.html form:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;form action=&quot;/setcookie&quot; method=&quot;POST&quot;&gt;
      &lt;button type=&quot;submit&quot;&gt;Set&lt;/button&gt;
  &lt;/form&gt;
  &lt;form action=&quot;/getcookie&quot; method=&quot;POST&quot;&gt;
      &lt;button type=&quot;submit&quot;&gt;Get&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>I compared the GA cookies to the cookies that I set and the only difference was the name and value so that confuses me even more. I also don't need to do anything with them on the frontend, they only need to be read by flask. Can someone help? Thanks</p>