From 6d63953e175465dfaf2c68099d6781440a50f924 Mon Sep 17 00:00:00 2001 From: Kaiohz Date: Fri, 24 Apr 2026 06:51:49 +0200 Subject: [PATCH 1/2] feat: add allowed orgins env var --- src/config.py | 1 + src/main.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.py b/src/config.py index 0529c90..74cfd7c 100644 --- a/src/config.py +++ b/src/config.py @@ -22,6 +22,7 @@ class Settings(BaseSettings): host: str = "0.0.0.0" port: int = 8000 log_level: str = "INFO" + allowed_origins: list[str] = ["http://localhost:8080"] tracing: TracingSettings = TracingSettings() minio_endpoint: str = "localhost:9040" diff --git a/src/main.py b/src/main.py index 01d2d2c..5127c47 100644 --- a/src/main.py +++ b/src/main.py @@ -124,7 +124,7 @@ async def lifespan(_app: FastAPI): app.add_middleware( CORSMiddleware, - allow_origins=["http://localhost:8030"], + allow_origins=settings.allowed_origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], From 4691d1eae7f06e4e3d819f709666ecc4e789cbf1 Mon Sep 17 00:00:00 2001 From: Kaiohz Date: Fri, 24 Apr 2026 07:04:06 +0200 Subject: [PATCH 2/2] feat: add openclaw review ci --- .github/workflows/ci.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d099d31..ebf432d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -77,3 +77,16 @@ jobs: with: args: > -Dsonar.qualitygate.wait=false + + - name: Notify OpenClaw for Review + if: success() + run: | + curl -s -X POST "https://openclaw.soludev.tech/hooks/agent" \ + -H "Authorization: Bearer ${{ secrets.OPENCLAW_WEBHOOK_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d '{ + "message": "CI terminée pour PR \"${{ github.event.pull_request.title }}\" - ${{ github.event.pull_request.html_url }}. Fais une review du code de la PR. Analyse les changements, ensuite poste un commentaire de review sur la PR. Donne un score de 1 à 10 pour la qualité du code, et suggère des améliorations si nécessaire.", + "deliver": true, + "channel": "telegram", + "to": "1988394825" + }'