Commit 69ad615d authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

gh: better

parent e144d9d6
Pipeline #15354 failed with stage
in 2 minutes and 6 seconds
......@@ -253,8 +253,6 @@ async def webhook(request: HttpRequest) -> HttpResponse:
thx https://simpleisbetterthancomplex.com/tutorial/2016/10/31/how-to-handle-github-webhooks-using-django.html
"""
if True:
return HttpResponseForbidden('DEBUG')
logger.info('GH webhook')
# validate ip source
forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR').split(', ')[0]
......@@ -300,8 +298,6 @@ async def gl_webhook(request: HttpRequest) -> HttpResponse:
"""Process request incoming from a gitlab webhook."""
# validate ip source
if True:
return HttpResponseForbidden('DEBUG')
if not ip_laas(request):
logger.warning('not from LAAS IP')
return HttpResponseRedirect(reverse('login'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment