Skip to content

Commit

Permalink
fix: fixes axios proxing to not parse response body
Browse files Browse the repository at this point in the history
  • Loading branch information
mathewmeconry committed Jul 20, 2023
1 parent 291f381 commit f62861d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/proxyRequest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from "axios";
import Express from "express";
import Express, { response } from "express";
import Logger from "./logger";

export function proxyRequest(ipfsBackend: string) {
Expand All @@ -14,6 +14,7 @@ export function proxyRequest(ipfsBackend: string) {
url: `${ipfsBackend}${req.originalUrl}`,
headers: {...req.headers as any, origin: 'localhost', referer: ''},
data: req.body,
responseType: 'arraybuffer'
})
.then((proxyResponse) => {
res
Expand Down

0 comments on commit f62861d

Please sign in to comment.