headers = "Content-Disposition": f'attachment; filename="filename"', # The downstream `StreamingResponse` will automatically forward # the `Content-Type` from the remote response if we set it later.
COPY . . ENV PORT=8000 EXPOSE 8000
# System deps RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential && rm -rf /var/lib/apt/lists/*
# --------------------------------------------------- # # Main download endpoint # --------------------------------------------------- # @app.post("/download") async def download(req: Request, payload: DownloadRequest): client_ip = req.client.host _check_rate_limit(client_ip)