Logout endpoint

main2
Bob Mottram 2019-10-30 11:35:40 +00:00
parent 12a0943d4b
commit 0465f33857
1 changed files with 9 additions and 0 deletions

View File

@ -633,6 +633,15 @@ class PubServer(BaseHTTPRequestHandler):
return False
def do_GET(self):
if self.path=='/logout':
self.send_response(200)
self.send_header('Content-Length', '0')
self.send_header('Set-Cookie', 'epicyon=; SameSite=Strict')
self.send_header('Location', '/')
self.send_header('X-Robots-Tag','noindex')
self.end_headers()
return
# redirect music to #nowplaying list
if self.path=='/music' or self.path=='/nowplaying':
self.path='/tags/nowplaying'