Is DNS resolution performed when using request patching? #1379
Unanswered
vietanhtran16
asked this question in
Q&A
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 |
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
At the moment, I am doing a request patching using
ctx.fetchso 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.fetchwith. Example below. Is this my correct understanding? ThanksAll reactions