Request delay when accessing proxied server from Chrome

Request delay when accessing proxied server from Chrome



I am using Vue.js's API proxying functionality (which internally uses http-proxy-middleware/http-proxy) to forward API requests to my localbackend server. I set it in vue.conf.js like so:


vue.conf.js


module.exports =
devServer:
port: 8081,
proxy:
'/api':
target: 'http://localhost:8080',
xfwd: false






For some weird reason though, about every other proxied request coming from Chrome is slow:



Slow requests



When a slow request is profiled in Chrome, it looks like below:
enter image description here



Any idea what might be causing this delay between fetchStart and requestStart? When accessing the proxy through 127.0.0.1, the problem goes away for some reason (DNS issues???). Checked the backend, and it responds correctly as well. The problem doesn't exist on Firefox either.


fetchStart


requestStart



System is latest Win10, checked on stable and canary Chrome.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Malaysia to Papua New Guinea by motorcycle?

List of Bhojpuri films

PHP code is not being executed, instead code shows on the page