Open AxelAli opened 5 years ago
Develop a proxy similar to http://anyproxy.io/en/
Desired features:
--config
How Should it behave:
route: { in: { stringMatcher: "order/add", port: 8080, methods: ["POST"], passQuery:true }, out: { endpoint: "add", domain: "localhost", port: 8080 } }
This will connect incomming POST localhost:8080/order/add?order=123 to localhost:9000/add?order=123
localhost:8080/order/add?order=123
localhost:9000/add?order=123
route: { in: { regexMatcher: "/\.(jpg)$/", port: 3000, methods: ["GET"], passPath: true }, out: { endpoint: "files/", domain: "localhost", port: 8080 } }
This will connect incoming GET localhost:3000/myFile.jpg to localhost:8080/files/myFile.jpg
localhost:3000/myFile.jpg
localhost:8080/files/myFile.jpg
Develop a proxy similar to http://anyproxy.io/en/
Desired features:
--config
parameter to pass a json configHow Should it behave:
This will connect incomming POST
localhost:8080/order/add?order=123
tolocalhost:9000/add?order=123
This will connect incoming GET
localhost:3000/myFile.jpg
tolocalhost:8080/files/myFile.jpg