V1.1 du système de gestions des rapports d'utilisateur
This commit is contained in:
parent
d155ebfcb0
commit
d794502508
1 changed files with 1 additions and 5 deletions
|
|
@ -77,11 +77,7 @@ def deploy():
|
||||||
|
|
||||||
@app.route('/gitlab_webhook', methods=['POST'])
|
@app.route('/gitlab_webhook', methods=['POST'])
|
||||||
def gitlab_webhook():
|
def gitlab_webhook():
|
||||||
# Protection stricte Anti-Crawler
|
# Protection par Token uniquement (anti-crawler géré par le secret)
|
||||||
user_agent = request.headers.get('User-Agent', '')
|
|
||||||
if 'GitLab' not in user_agent:
|
|
||||||
abort(404) # Retourne une 404 pour simuler que la page n'existe pas
|
|
||||||
|
|
||||||
if request.headers.get('X-Gitlab-Token') != WEBHOOK_SECRET:
|
if request.headers.get('X-Gitlab-Token') != WEBHOOK_SECRET:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue