搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Firefox won't store cookie from https://localhost. How do I fix this?

  • 1 个回答
  • 0 人有此问题
  • 10 次查看
  • 最后回复者为 cor-el

more options

I am developing a React application with a Flask backend. The Flask backend has a "login" endpoint that sets an authentication cookie that is then supposed to be used to authenticate the end user in future requests to the backend.

After receiving the cookie from the Flask backend, the React app makes a call like so:

```

   const response = await fetch(apiUrl,{
       method: "GET",
       credentials: "same-origin"
   });

```

but Firefox does not include the authentication cookie. I am told this may be because Firefox doesn't store cookies transmitted over HTTPS from localhost.

For obvious reasons, I want Firefox to store the authentication cookie. What can I do to make sure Firefox stores the cookie?

I am developing a React application with a Flask backend. The Flask backend has a "login" endpoint that sets an authentication cookie that is then supposed to be used to authenticate the end user in future requests to the backend. After receiving the cookie from the Flask backend, the React app makes a call like so: ``` const response = await fetch(apiUrl,{ method: "GET", credentials: "same-origin" }); ``` but Firefox does not include the authentication cookie. I am told this may be because Firefox doesn't store cookies transmitted over HTTPS from localhost. For obvious reasons, I want Firefox to store the authentication cookie. What can I do to make sure Firefox stores the cookie?

所有回复 (1)

more options

Probably best would be to ask advice on a web development oriented forum.