We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 678949c commit 8e8735cCopy full SHA for 8e8735c
README.md
@@ -42,6 +42,8 @@ service.start(3000)
42
middlewares: [],
43
// Optional global value for routes "pathRegex". Default value: '/*'
44
pathRegex: '/*',
45
+ // Optional "target" value that overrides the routes "target" config value. Feature intended for testing purposes.
46
+ targetOverride: "https://yourdev.api-gateway.com",
47
48
// HTTP proxy
49
routes: [{
index.js
@@ -43,7 +43,7 @@ const gateway = (opts) => {
// instantiate route proxy
const { proxy } = fastProxy({
- base: route.target,
+ base: opts.targetOverride || route.target,
http2: !!route.http2,
...(opts.fastProxy)
})
0 commit comments