Is DNS resolution performed when using request patching? #1379
Replies: 1 comment 6 replies
-
Hey, @vietanhtran16. The way request interception works is that whenever a request matching your handler is performed, MSW executes your response resolver, allowing you to decide what to do with that request. Based on this, the I believe the behavior is the same if you implement a similar route handler in any server: app.get('/', (req, res) => {
const proxyRes = await fetch('http://proxy.example')
})
Are you experiencing trouble with the DNS resolution for |
Beta Was this translation helpful? Give feedback.
-
Hi,
At the moment, I am doing a request patching using
ctx.fetch
so that I can use MSW as a proxy to redirect to a local instance of a service that my nodejs application is requesting.It seems to still performing DNS resolution to the original url instead of just proxying it to the url that I am using
ctx.fetch
with. Example below. Is this my correct understanding? ThanksBeta Was this translation helpful? Give feedback.
All reactions