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: