Ovi / DummyJSON

DummyJSON.com provides different types of REST Endpoints filled with JSON data which you can use in developing the frontend with your favorite framework and library without worrying about writing a backend.
http://dummyjson.com
Other
1.87k stars 202 forks source link

Inconsistency between "Set-Cookie" headers and fetch responses #79

Closed gokhantaskan closed 2 months ago

gokhantaskan commented 2 months ago

My code includes the following implementation:

CleanShot 2024-09-16 at 23 32 37@2x

The idea is to directly use the "Set-Cookie" headers from the original response inside a Next.js middleware. As you can see in the following screenshot:

CleanShot 2024-09-16 at 23 29 34@2x

Ovi commented 2 months ago

Thank you @gokhantaskan!

Since this could be a breaking change for many users, I will display a warning (banner) on the web before making it. Afterward, we will be using accessToken instead of token.