Proxy: same route but different http method #825
cchandrakanth
started this conversation in
General
Replies: 1 comment
-
This is how the proxy is supposed to work.
Here are the two environment JSON if you want to test (Copy, then File->New environment from clipboard): Proxy environment (port 3001): {
"uuid": "8123bf7c-c052-4b38-ad36-f609038e9e7f",
"lastMigration": 22,
"name": "Proxy",
"endpointPrefix": "",
"latency": 0,
"port": 3001,
"hostname": "0.0.0.0",
"routes": [
{
"uuid": "a0a69ac6-6aab-4c62-a8ae-ade7e68711e9",
"documentation": "",
"method": "get",
"endpoint": "test",
"responses": [
{
"uuid": "e2835583-2931-4677-9f5e-18477f0758be",
"body": "GET test on proxy",
"latency": 0,
"statusCode": 200,
"label": "",
"headers": [],
"filePath": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true
}
],
"enabled": true,
"responseMode": null
}
],
"proxyMode": true,
"proxyHost": "http://localhost:3002",
"proxyRemovePrefix": false,
"tlsOptions": {
"enabled": false,
"type": "CERT",
"pfxPath": "",
"certPath": "",
"keyPath": "",
"caPath": "",
"passphrase": ""
},
"cors": true,
"headers": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"proxyReqHeaders": [],
"proxyResHeaders": []
} Proxied environment (port 3002): {
"uuid": "943135c7-d04d-4e8c-899d-517534c42e79",
"lastMigration": 22,
"name": "Proxied",
"endpointPrefix": "",
"latency": 0,
"port": 3002,
"hostname": "0.0.0.0",
"routes": [
{
"uuid": "52678a8a-4491-4677-9ab1-b1e7861727e5",
"documentation": "",
"method": "post",
"endpoint": "test",
"responses": [
{
"uuid": "2609c1e4-a4b9-4e6c-b299-2be53cee8967",
"body": "POST test route on proxied",
"latency": 0,
"statusCode": 200,
"label": "",
"headers": [],
"filePath": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true
}
],
"enabled": true,
"responseMode": null
}
],
"proxyMode": false,
"proxyHost": "",
"proxyRemovePrefix": false,
"tlsOptions": {
"enabled": false,
"type": "CERT",
"pfxPath": "",
"certPath": "",
"keyPath": "",
"caPath": "",
"passphrase": ""
},
"cors": true,
"headers": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"proxyReqHeaders": [],
"proxyResHeaders": []
} If you still encounter the issue, please provide precise steps to reproduce it, together with an example environment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying to explore the tool for mocks and I observe the behavior about proxy.
Hits proxy if the route is not existed.
My expectation is that it should check for both route and HTTP method.
/pets
and I was hitting GET/pets
using the mock server is not hitting proxy and got response saying "This route does no longer exists anymore" with 404 Status Code. I don't see the proxy icon under logs.Beta Was this translation helpful? Give feedback.
All reactions