Problems with express forwarding the local tomact interface

express uses the "http-proxy-middleware" plug-in to forward requests, and the local tomact uses port 80. Then prompt Error occured while trying to proxy to: localhost:3000/file/public/upload
when you visit, what is the reason for this? Is it because the java interface does not have cross-domain settings?

Oct.12,2021

Cross-domain is only on the browser side. Your hint is that the agent is in the wrong place.


prompt error to read the error log first. Cross-domain is the browser's limit. It is certainly impossible.


problem solved. I did not read the http-proxy-middleware plug-in usage document myself, and the parameters were written incorrectly when forwarding the request

.
Menu