Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 74a0bac

Browse files
committedApr 2, 2020
Rename hxxp to isHttp
1 parent e7e7b0f commit 74a0bac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/node/app/proxy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ export class ProxyHttpProvider extends HttpProvider implements HttpProxyProvider
168168
// the event.
169169
;(request as Request).base = base
170170

171-
const hxxp = response instanceof http.ServerResponse
171+
const isHttp = response instanceof http.ServerResponse
172172
const path = base ? route.fullPath.replace(base, "") : route.fullPath
173173
const options: proxy.ServerOptions = {
174174
changeOrigin: true,
175175
ignorePath: true,
176-
target: `${hxxp ? "http" : "ws"}://127.0.0.1:${port}${path}${
176+
target: `${isHttp ? "http" : "ws"}://127.0.0.1:${port}${path}${
177177
Object.keys(route.query).length > 0 ? `?${querystring.stringify(route.query)}` : ""
178178
}`,
179-
ws: !hxxp,
179+
ws: !isHttp,
180180
}
181181

182182
if (response instanceof http.ServerResponse) {

0 commit comments

Comments
 (0)
Please sign in to comment.