Apply settings to all cookies

main
Bob Mottram 2020-06-21 12:04:46 +00:00
parent 48fbbe9247
commit 3dea14cee8
1 changed files with 5 additions and 1 deletions

View File

@ -565,7 +565,11 @@ class PubServer(BaseHTTPRequestHandler):
if cookie:
if not cookie.startswith('SET:'):
self.send_header('Cookie', cookie)
cookieStr = cookie
if self.server.httpPrefix == 'https':
cookieStr += '; Secure'
cookieStr += '; HttpOnly; SameSite=Strict'
self.send_header('Cookie', cookieStr)
else:
setCookieStr = cookie.replace('SET:', '').strip()
if self.server.httpPrefix == 'https':