From 94a869ae42a388917245bb44d048fd78318e85fd Mon Sep 17 00:00:00 2001 From: CahidArda Date: Mon, 2 Jun 2025 10:12:28 +0300 Subject: [PATCH 1/2] fix: ignore render loop headers and bump version --- pyproject.toml | 2 +- upstash_workflow/__init__.py | 2 +- upstash_workflow/workflow_requests.py | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c804b42..7c45f03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "upstash-workflow" -version = "0.1.2" +version = "0.1.3" description = "Python SDK for Upstash Workflow" license = "MIT" authors = ["Upstash "] diff --git a/upstash_workflow/__init__.py b/upstash_workflow/__init__.py index acdd321..04aa785 100644 --- a/upstash_workflow/__init__.py +++ b/upstash_workflow/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.1.2" +__version__ = "0.1.3" from upstash_workflow.context.context import WorkflowContext from upstash_workflow.serve.serve import serve diff --git a/upstash_workflow/workflow_requests.py b/upstash_workflow/workflow_requests.py index 9c5cdcd..9de3c9c 100644 --- a/upstash_workflow/workflow_requests.py +++ b/upstash_workflow/workflow_requests.py @@ -96,9 +96,16 @@ def _recreate_user_headers(headers: Dict[str, str]) -> Dict[str, str]: if not any( [ header_lower.startswith("upstash-workflow-"), + # https://vercel.com/docs/edge-network/headers/request-headers#x-vercel-id header_lower.startswith("x-vercel-"), header_lower.startswith("x-forwarded-"), + # https://blog.cloudflare.com/preventing-request-loops-using-cdn-loop/ header_lower == "cf-connecting-ip", + header_lower == "cdn-loop", + header_lower == "cf-ew-via", + header_lower == "cf-ray", + # For Render https://render.com + header_lower == "render-proxy-ttl" ] ): filtered_headers[header] = value From e2bbe5783716694dc56815d1574a7d5eb41f828f Mon Sep 17 00:00:00 2001 From: CahidArda Date: Mon, 2 Jun 2025 10:21:04 +0300 Subject: [PATCH 2/2] fix: fmt --- upstash_workflow/workflow_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstash_workflow/workflow_requests.py b/upstash_workflow/workflow_requests.py index 9de3c9c..accf056 100644 --- a/upstash_workflow/workflow_requests.py +++ b/upstash_workflow/workflow_requests.py @@ -105,7 +105,7 @@ def _recreate_user_headers(headers: Dict[str, str]) -> Dict[str, str]: header_lower == "cf-ew-via", header_lower == "cf-ray", # For Render https://render.com - header_lower == "render-proxy-ttl" + header_lower == "render-proxy-ttl", ] ): filtered_headers[header] = value