From a55d12696a20653c60530f69375aa1307af8e80d Mon Sep 17 00:00:00 2001 From: Typosaurus Date: Sun, 19 Jul 2026 21:08:41 +0000 Subject: [PATCH 1/2] ticket #93 attempt 1 --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ccc102c5..73b0fede 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,8 @@ version = "1.0.0" description = "DevPlace - The Developer Social Network" requires-python = ">=3.12" dependencies = [ - "fastapi", + "fastapi>=0.110.0", + "starlette>=0.37.0", "uvicorn[standard]", "jinja2", "python-multipart", -- 2.45.2 From 63366bb2400892dbed1f86d84188790eae3627c2 Mon Sep 17 00:00:00 2001 From: Typosaurus Date: Thu, 23 Jul 2026 02:03:12 +0000 Subject: [PATCH 2/2] ticket #93 attempt 1 --- devplacepy/main.py | 5 ----- devplacepy/templates/docs/architecture-backend.html | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/devplacepy/main.py b/devplacepy/main.py index dcaa7787..1d861c6c 100644 --- a/devplacepy/main.py +++ b/devplacepy/main.py @@ -12,7 +12,6 @@ from fastapi import FastAPI, Request from fastapi.responses import HTMLResponse, RedirectResponse from fastapi.staticfiles import StaticFiles from fastapi.exceptions import RequestValidationError -from starlette.middleware.gzip import GZipMiddleware from devplacepy.config import ( STATIC_DIR, STATIC_VERSION, @@ -610,10 +609,6 @@ async def response_timing(request: Request, call_next): response.headers["X-Response-Time"] = f"{(time.perf_counter() - start) * 1000:.1f}ms" return response - -app.add_middleware(GZipMiddleware, minimum_size=512, compresslevel=5) - - _home_cache = TTLCache(ttl=int(os.environ.get("DEVPLACE_HOME_CACHE_TTL", "60")), max_size=4) diff --git a/devplacepy/templates/docs/architecture-backend.html b/devplacepy/templates/docs/architecture-backend.html index 2fa6b10a..4d6aadcf 100644 --- a/devplacepy/templates/docs/architecture-backend.html +++ b/devplacepy/templates/docs/architecture-backend.html @@ -11,7 +11,7 @@ How a request flows through middleware to a router, how the database layer is bu ## Middleware -Seven HTTP middlewares run as a stack around every request, listed outermost first. `response_timing` is the outermost, `refresh_db_snapshot` the innermost, and a `GZipMiddleware` (responses over 512 bytes) wraps the whole stack on top: +Six HTTP middlewares run as a stack around every request, listed outermost first. `response_timing` is the outermost and `refresh_db_snapshot` the innermost. Compression is handled by nginx in production; the Python application does not compress responses itself. | Middleware (outermost first) | Responsibility | |------------|----------------| -- 2.45.2