sausheong / gwp

Go Web Programming code repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't get the cookie in logout function

lyeka opened this issue · comments

commented

1.The way getting cookie in logout function can not get the cookie.

image.

2.Because the way setting cookie in authenticate function did not set the path, and it was automatically set to "/authenticate".

image

3.And the logout function is serving in the path -- "/logout". So the server can't get the cookie in path -- "/authenticate".

4.My way to solve this problem is to set the path to "/logout" in authenticate function, that works.

image

5.I wonder is that a right or good way to solve this problem ? And what is the best way?