diff --git a/backend-sample-app.py b/backend-sample-app.py index 3170d80..970c3ab 100755 --- a/backend-sample-app.py +++ b/backend-sample-app.py @@ -74,7 +74,7 @@ class AppHandler(BaseHTTPRequestHandler): Username: - Password: + Password: @@ -119,6 +119,8 @@ class AppHandler(BaseHTTPRequestHandler): # # WARNING WARNING WARNING enc = base64.b64encode(ensure_bytes(user + ':' + passwd)) + if sys.version_info.major == 3: + enc = enc.decode() self.send_header('Set-Cookie', b'nginxauth=' + enc + b'; httponly') self.send_header('Location', target)