fix: ensurepip pour Python embed + CSP autorise 127.0.0.1
CI / lint (push) Successful in 24s
CI / security (push) Successful in 14s
CI / test (push) Successful in 28s
CI / build (push) Successful in 11s
CI / e2e (push) Failing after 35s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled

- build-windows.bat: ajouter python -m ensurepip --upgrade (Python embed n'a pas pip)
- tauri.conf.json: ajouter http://127.0.0.1:* dans toutes les directives CSP
  Sans ça, 'self' = schéma tauri://, pas le backend local → CSS/images bloqués
This commit is contained in:
2026-07-26 11:32:43 -04:00
parent 99fa464dca
commit 1b4a6ff0cf
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -27,6 +27,9 @@ del python-embed.zip
REM Enable pip in embedded Python
echo import site >> python-embed\python311._pth
REM Bootstrap pip (embed Python doesn't include it)
python-embed\python.exe -m ensurepip --upgrade
REM Install dependencies
python-embed\python.exe -m pip install --no-cache-dir -r ..\backend\requirements.txt
echo ✅ Python embed ready
+1 -1
View File
@@ -27,7 +27,7 @@
}
],
"security": {
"csp": "default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://unpkg.com https://esm.sh; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: blob: https:; connect-src 'self' http://127.0.0.1:* ws://127.0.0.1:*;"
"csp": "default-src 'self' http://127.0.0.1:*; script-src 'self' 'unsafe-inline' http://127.0.0.1:* https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://unpkg.com https://esm.sh; style-src 'self' 'unsafe-inline' http://127.0.0.1:* https://cdnjs.cloudflare.com https://fonts.googleapis.com; font-src 'self' http://127.0.0.1:* https://fonts.gstatic.com; img-src 'self' data: blob: http://127.0.0.1:* https:; connect-src 'self' http://127.0.0.1:* ws://127.0.0.1:*;"
},
"trayIcon": {
"iconPath": "icons/icon.png",