diff --git a/docker-compose.yml b/docker-compose.yml index 5a6b3d5..9645f2a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,3 +3,5 @@ services: build: . ports: - "8868:8868" + volumes: + - .:/app diff --git a/lemmyprivacycheck/__main__.py b/lemmyprivacycheck/__main__.py index 95f76ca..a28a420 100644 --- a/lemmyprivacycheck/__main__.py +++ b/lemmyprivacycheck/__main__.py @@ -19,7 +19,7 @@ async def root(): async def getImage(request: fastapi.Request): img2 = img.copy() draw = ImageDraw.Draw(img2) - draw.text((img2.width/2,img2.height/2), request.client.host, (255,255,255), font=font, stroke_width=5, stroke_fill=(0,0,0), anchor="mm") + draw.text((img2.width/2,img2.height/2), request.headers["x-forwarded-for"], (255,255,255), font=font, stroke_width=5, stroke_fill=(0,0,0), anchor="mm") img_bin = BytesIO() img2.save(img_bin, format="jpeg") return fastapi.Response(content=img_bin.getvalue(), media_type="image/jpeg")