Skip to content

Commit 44d26a7

Browse files
committed
Updated axios usage in proxy
1 parent 02ae32e commit 44d26a7

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.github/workflows/node.js.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Use Node.js
1616
uses: actions/setup-node@v1
1717
with:
18-
node-version: "18.x"
18+
node-version: "20.x"
1919
registry-url: "https://registry.npmjs.org"
2020
- name: Install Dependencies
2121
run: npm install
@@ -38,7 +38,7 @@ jobs:
3838
- name: Use Node.js
3939
uses: actions/setup-node@v1
4040
with:
41-
node-version: "18.x"
41+
node-version: "20.x"
4242
registry-url: "https://registry.npmjs.org"
4343
- name: Install Dependencies
4444
run: npm install
@@ -63,7 +63,7 @@ jobs:
6363
- name: Use Node.js
6464
uses: actions/setup-node@v1
6565
with:
66-
node-version: "18.x"
66+
node-version: "20.x"
6767
registry-url: "https://registry.npmjs.org"
6868
- name: Install Dependencies
6969
run: npm install

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.16.1
4+
5+
- Fixed issue with proxy injector not returning response
6+
37
## 0.16.0
48

59
- Fixed error handling with wrong JSON format (#65)

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kras",
3-
"version": "0.16.0",
3+
"version": "0.16.1",
44
"description": "Efficient server proxying and mocking in Node.js.",
55
"main": "dist/server/index.js",
66
"types": "dist/server/index.d.ts",
@@ -10,6 +10,7 @@
1010
"engines": {
1111
"node": ">=16.0.0"
1212
},
13+
"homepage": "https://github.com/FlorianRappl/kras",
1314
"repository": {
1415
"type": "git",
1516
"url": "https://github.com/FlorianRappl/kras.git"
@@ -55,7 +56,7 @@
5556
"@types/accept-language-parser": "^1.5.3",
5657
"@types/body-parser": "^1.19.2",
5758
"@types/chokidar": "^2.1.3",
58-
"@types/cookie": "^0.4.1",
59+
"@types/cookie": "^0.5.0",
5960
"@types/express": "^4.17.17",
6061
"@types/express-ws": "^3.0.1",
6162
"@types/faker": "^5.5.9",
@@ -72,7 +73,7 @@
7273
"body-parser": "^1.20.2",
7374
"chalk": "^3.0.0",
7475
"chokidar": "^3.5.3",
75-
"cookie": "^0.4.2",
76+
"cookie": "^0.5.0",
7677
"cross-env": "^7.0.3",
7778
"dets": "^0.14.2",
7879
"enzyme-to-json": "^3.6.2",

src/server/helpers/proxy-request.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export async function proxyRequest(req: ProxyRequestOptions): Promise<KrasAnswer
5353
}),
5454
responseType: 'arraybuffer',
5555
method: req.method,
56+
validateStatus: () => true,
5657
proxy: req.proxy,
5758
headers: req.headers,
5859
data: req.body,

0 commit comments

Comments
 (0)