Merge pull request #1698 from selfhoster1312/portal-api

Handle both cookies in the same way (please let me logout)
This commit is contained in:
Alexandre Aubin 2023-08-13 23:42:19 +02:00 committed by GitHub
commit dafae50e8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -138,6 +138,7 @@ class Authenticator(BaseAuthenticator):
secure=True,
secret=session_secret,
httponly=True,
path="/"
# samesite="strict", # Bottle 0.12 doesn't support samesite, to be added in next versions
)
@ -172,5 +173,4 @@ class Authenticator(BaseAuthenticator):
def delete_session_cookie(self):
from bottle import response
response.set_cookie("yunohost.admin", "", max_age=-1)
response.delete_cookie("yunohost.admin")
response.delete_cookie("yunohost.admin", path="/")

View file

@ -172,5 +172,4 @@ class Authenticator(BaseAuthenticator):
from bottle import response
response.set_cookie("yunohost.portal", "")
response.delete_cookie("yunohost.portal")
response.delete_cookie("yunohost.portal", path="/")