From 5f981509acfddac9154a6473e9a79a23237c550b Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Tue, 25 Aug 2026 21:23:04 -0400 Subject: [PATCH] fix(publish): user-agent navigateur pour contourner le blocage Cloudflare 1010 (writes Gitea) --- scripts/publish_release.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/publish_release.py b/scripts/publish_release.py index 5f3672e..8db5285 100644 --- a/scripts/publish_release.py +++ b/scripts/publish_release.py @@ -128,6 +128,13 @@ def make_gitea_request( if content_type: req.add_header("Content-Type", content_type) req.add_header("Accept", "application/json") + # Cloudflare sur git.dracodev.net bloque les User-Agents "Python-urllib/*" + # (HTTP 403 Error 1010) pour les écritures ; on présente un UA navigateur. + req.add_header( + "User-Agent", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " + "(KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", + ) try: with urllib.request.urlopen(req, data=data) as resp: