title: Connecting localhost to a remote dev server (CORS, same-site, secure and other headaches)
body: <p>I'm currently working on a React project. The development server (Bottle/Python) for the project is hosted remotely, and my React dev-server is localhost. Part of the authentication process for the application involves setting a cookie on login, but because of same-site and secure rules that cookie is not being set, meaning that my dev frontend can't access any of the data that it needs.</p>
  <p>Myself and the server engineer have added SameSite=None to the cookie as well as secure, but because my localhost is not https the cookie is still not being stored properly (I get the error message &quot;this Set-Cookie&quot; was blocked because it had the &quot;Secure&quot; attribute but was not received over a secure connection&quot;).</p>
  <p>There are no issues when the app is deployed because everything is on the same domain, but for now we're stuck - we've been trying to solve the issue for several hours but can't seem to get it.</p>
  <p>My question is - what is the best development practice if you need to access a non-local development server, but can't actually just have your own version of the server running on your local machine?</p>
  <p>Do I:</p>
  <ol>
  <li>Need to make my localhost https somehow?</li>
  <li>Need to make the dev-server domain https?</li>
  <li>Need to install the server locally because there's just no way to do this?</li>
  </ol>
  <p>Apologies if this is a noob question, it would be great to have some advice.
  Many thanks.</p>