thomasw / djproxy

djproxy is a class-based generic view reverse HTTP proxy for Django.
MIT License
42 stars 15 forks source link

Implement middleware to handle multi set cookie #45

Open FabienArcellier opened 2 years ago

FabienArcellier commented 2 years ago

Related to #44 Handles the transmission of multiple cookies returned by a server as multiple set-cookie headers.

Request merges the set-cookie headers into one. The default behavior is ok if the server returns only one cookie per http response.

The browser will receive only one cookie.

{
    Set-Cookie: hello=world; Expires=Wed, 21 Oct 2015 07:28:00 GMT, world=hello
}

instead

{
    Set-Cookie: hello=world; Expires=Wed, 21 Oct 2015 07:28:00 GMT
    Set-Cookie: world=hello
}

more about this behavior