From cea671c0ac983a418777a696fb3d44003c09cdcf Mon Sep 17 00:00:00 2001 From: Antoine Jacquin Date: Mon, 14 Sep 2026 19:30:08 +0200 Subject: [PATCH] =?UTF-8?q?Afficher=20l'IP=20client=20(x-forwarded-for)=20?= =?UTF-8?q?dans=20les=20logs=20des=20requ=C3=AAtes=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- lidar_pipeline/index.py | 89 +++++++++++++++++----- lidar_pipeline/tests/test_webapp.py | 39 ++++++++++ lidar_pipeline/webapp.py | 110 ++++++++++++++++++++++++++++ 4 files changed, 219 insertions(+), 21 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f0586d9..5cc6842 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,7 +37,7 @@ ### Module structure & data flow - `cli.py` → `pipeline.py` (LidarArchaeoPipeline) → per-file: `dtm.py` (classify + rasterize) → `visualizations.py` (17 products) → `rendering.py` (GeoTIFF→AVIF) → `index.py` (Leaflet map) - `gpu.py` provides CuPy/NumPy proxy (`xp`), lazy init, OOM fallback. `safe_gpu_call` wraps all non-IGN viz calls. -- `webapp.py` (FastAPI) serves the map + `/api/generate` launches the pipeline as a subprocess. Two-machine mode: `LIDAR_GENERATION_URL` delegates to remote worker. `/api/export` assembles adjacent tiles into an image/PDF via `export.py` (local cache, no delegation). +- `webapp.py` (FastAPI) serves the map + `/api/generate` launches the pipeline as a subprocess. Two-machine mode: `LIDAR_GENERATION_URL` delegates to remote worker. `/api/export` assembles adjacent tiles into an image/PDF via `export.py` (local cache, no delegation). `/api/presets` (GET/POST/DELETE) shares layer presets between browsers (`output/.presets.json`, localStorage echo in the interface as fallback). - `progress.py` writes JSONL events (O_APPEND, atomic) read by webapp for live progress. - `export.py` stitches adjacent tile visualizations into a seamless mosaic (PNG/JPEG/WebP) or multi-page PDF, Pillow-only for the lightweight webapp. diff --git a/lidar_pipeline/index.py b/lidar_pipeline/index.py index b524dba..e2cce1b 100644 --- a/lidar_pipeline/index.py +++ b/lidar_pipeline/index.py @@ -1389,6 +1389,11 @@ const STATS = {stats_json}; _APP_CSS = """/* Interface de la carte LiDAR — barre latérale à onglets type SIG. */ :root { + /* Le color-scheme impose au navigateur le rendu sombre des contrôles + natifs (popup des