Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nginx Ldap Auth
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Nginx Ldap Auth
Commits
48cdd5e5
Unverified
Commit
48cdd5e5
authored
Jan 13, 2020
by
Pavel Lychkousky
Committed by
GitHub
Jan 13, 2020
Browse files
Options
Downloads
Patches
Plain Diff
Fix for Python3
parent
a3a04fac
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend-sample-app.py
+3
-1
3 additions, 1 deletion
backend-sample-app.py
with
3 additions
and
1 deletion
backend-sample-app.py
+
3
−
1
View file @
48cdd5e5
...
...
@@ -74,7 +74,7 @@ class AppHandler(BaseHTTPRequestHandler):
<tr>
<td>Username: <input type=
"
text
"
name=
"
username
"
/></td>
<tr>
<td>Password: <input type=
"
text
"
name=
"
password
"
/></td>
<td>Password: <input type=
"
password
"
name=
"
password
"
/></td>
<tr>
<td><input type=
"
submit
"
value=
"
Login
"
></td>
</table>
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment