Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,15 @@ async def proxy_to_node(
|
|
139 |
|
140 |
print(f"\nHeaders: {r.headers}\n")
|
141 |
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
|
145 |
@app.api_route(
|
|
|
139 |
|
140 |
print(f"\nHeaders: {r.headers}\n")
|
141 |
|
142 |
+
new_headers = {
|
143 |
+
key: value
|
144 |
+
for key, value in response.headers.items()
|
145 |
+
if key.lower() != "content-length"
|
146 |
+
}
|
147 |
+
|
148 |
+
new_headers["Transfer-Encoding"] = "chunked"
|
149 |
+
|
150 |
+
return StreamingResponse(response.aiter_raw(), headers=new_headers)
|
151 |
|
152 |
|
153 |
@app.api_route(
|