We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3a04fa commit 48cdd5eCopy full SHA for 48cdd5e
backend-sample-app.py
@@ -74,7 +74,7 @@ def auth_form(self, target = None):
74
<tr>
75
<td>Username: <input type="text" name="username"/></td>
76
77
- <td>Password: <input type="text" name="password"/></td>
+ <td>Password: <input type="password" name="password"/></td>
78
79
<td><input type="submit" value="Login"></td>
80
</table>
@@ -119,6 +119,8 @@ def do_POST(self):
119
#
120
# WARNING WARNING WARNING
121
enc = base64.b64encode(ensure_bytes(user + ':' + passwd))
122
+ if sys.version_info.major == 3:
123
+ enc = enc.decode()
124
self.send_header('Set-Cookie', b'nginxauth=' + enc + b'; httponly')
125
126
self.send_header('Location', target)
0 commit comments