From 0465f33857a5f9a944b34a2fa80b8c1f385579d3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 30 Oct 2019 11:35:40 +0000 Subject: [PATCH] Logout endpoint --- daemon.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/daemon.py b/daemon.py index 87032b95..015304b5 100644 --- a/daemon.py +++ b/daemon.py @@ -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'