We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 696a78c commit 5c6604aCopy full SHA for 5c6604a
1 file changed
cf_bypasser/core/mirror.py
@@ -182,8 +182,17 @@ async def mirror_request(
182
await asyncio.sleep(.5)
183
continue
184
185
+ # remove the Content-Encoding and Content-Length headers
186
+ final_headers = {}
187
+ for k, v in response_headers.items():
188
+ k_lower = k.lower()
189
+ if k_lower == "content-encoding":
190
+ final_headers[k] = "identity"
191
+ elif k_lower == "content-length":
192
+ final_headers[k] = str(len(response.content))
193
+
194
logging.info(f"Request to {hostname} completed with status {status_code}")
- return status_code, response_headers, response_content
195
+ return status_code, final_headers, response_content
196
197
except Exception as e:
198
if attempt < max_retries:
0 commit comments