Skip to content

Commit

Permalink
Updated axios usage in proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Mar 8, 2024
1 parent 02ae32e commit 44d26a7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "18.x"
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
run: npm install
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "18.x"
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
run: npm install
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "18.x"
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
run: npm install
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.16.1

- Fixed issue with proxy injector not returning response

## 0.16.0

- Fixed error handling with wrong JSON format (#65)
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kras",
"version": "0.16.0",
"version": "0.16.1",
"description": "Efficient server proxying and mocking in Node.js.",
"main": "dist/server/index.js",
"types": "dist/server/index.d.ts",
Expand All @@ -10,6 +10,7 @@
"engines": {
"node": ">=16.0.0"
},
"homepage": "https://github.com/FlorianRappl/kras",
"repository": {
"type": "git",
"url": "https://github.com/FlorianRappl/kras.git"
Expand Down Expand Up @@ -55,7 +56,7 @@
"@types/accept-language-parser": "^1.5.3",
"@types/body-parser": "^1.19.2",
"@types/chokidar": "^2.1.3",
"@types/cookie": "^0.4.1",
"@types/cookie": "^0.5.0",
"@types/express": "^4.17.17",
"@types/express-ws": "^3.0.1",
"@types/faker": "^5.5.9",
Expand All @@ -72,7 +73,7 @@
"body-parser": "^1.20.2",
"chalk": "^3.0.0",
"chokidar": "^3.5.3",
"cookie": "^0.4.2",
"cookie": "^0.5.0",
"cross-env": "^7.0.3",
"dets": "^0.14.2",
"enzyme-to-json": "^3.6.2",
Expand Down
1 change: 1 addition & 0 deletions src/server/helpers/proxy-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export async function proxyRequest(req: ProxyRequestOptions): Promise<KrasAnswer
}),
responseType: 'arraybuffer',
method: req.method,
validateStatus: () => true,
proxy: req.proxy,
headers: req.headers,
data: req.body,
Expand Down

0 comments on commit 44d26a7

Please sign in to comment.