From 7b025747b0c49e09aa187d9435848ad2c286bfcc Mon Sep 17 00:00:00 2001 From: Barden Date: Sun, 22 Feb 2026 13:10:46 +0300 Subject: [PATCH 1/2] Security patch --- app/main.py | 2 +- nginx/default.conf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 27ba690..18e7a89 100644 --- a/app/main.py +++ b/app/main.py @@ -23,7 +23,7 @@ async def lifespan(app: FastAPI): app = FastAPI(lifespan=lifespan) -Instrumentator().instrument(app).expose(app) +Instrumentator().instrument(app).expose(app, include_redis=False) app.include_router(router) diff --git a/nginx/default.conf b/nginx/default.conf index 9693716..af0c566 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -27,4 +27,8 @@ server{ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://backend; } + + location = /metrics { + return 404; + } } From d5783b93daa78eafbc973cd11bcda18765618180 Mon Sep 17 00:00:00 2001 From: Barden Date: Sun, 22 Feb 2026 13:12:48 +0300 Subject: [PATCH 2/2] Security patch --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 18e7a89..1bfa807 100644 --- a/app/main.py +++ b/app/main.py @@ -23,7 +23,7 @@ async def lifespan(app: FastAPI): app = FastAPI(lifespan=lifespan) -Instrumentator().instrument(app).expose(app, include_redis=False) +Instrumentator().instrument(app).expose(app, include_in_schema=False) app.include_router(router)