Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
d3a8d116
Commit
d3a8d116
authored
Feb 25, 2020
by
Guilhem Saurel
Browse files
fix token
parent
b535ffdf
Pipeline
#8495
passed with stage
in 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gh/views.py
View file @
d3a8d116
...
...
@@ -170,8 +170,8 @@ def gl_webhook(request: HttpRequest) -> HttpResponse:
if
token
is
None
:
print
(
'no token'
)
return
HttpResponseRedirect
(
reverse
(
'login'
))
if
token
!=
settings
.
GIT
HU
B_WEBHOOK_KEY
:
print
(
f
'wrong token
:
{
token
}
'
)
if
token
!=
settings
.
GIT
LA
B_WEBHOOK_KEY
:
print
(
'wrong token'
)
return
HttpResponseForbidden
(
'wrong token.'
)
event
=
request
.
META
.
get
(
'HTTP_X_GITLAB_EVENT'
,
'ping'
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment