Skip to content

Commit 120842a

Browse files
committed
feat: add target property to proxy option paths
1 parent 2198a8e commit 120842a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/server/proxy-option.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const proxyOptionPathsAsProperties = [
2424
},
2525
{
2626
context: "/foo",
27+
target: `http://localhost:${port1}`,
2728
pathRewrite: (_path, req) => {
2829
if (/\.html$/.test(req.path || req.url)) {
2930
return "/index.html";
@@ -34,6 +35,7 @@ const proxyOptionPathsAsProperties = [
3435
},
3536
{
3637
context: "/proxy/async",
38+
target: `http://localhost:${port1}`,
3739
router: async (req, res) => {
3840
if (/\/proxy\/async$/.test(req.path || req.url)) {
3941
return new Promise((resolve) => {

0 commit comments

Comments
 (0)