prepare route protection

This commit is contained in:
Jakob Ketterl
2020-02-23 19:23:18 +01:00
parent aa9737498a
commit 0a20cb5e41
4 changed files with 40 additions and 0 deletions

View File

@ -21,6 +21,11 @@ class Controller(ABC):
content = content.encode()
self.handler.wfile.write(content)
def send_redirect(self, location, code=303):
self.handler.send_response(code)
self.handler.send_header("Location", location)
self.handler.end_headers()
def handle_request(self):
action = "indexAction"
if "action" in self.options: