![](/img/trans.png)
[英]Is there a way to connect a printer to Mac if it is not compatible with Mac OS?
[英]Mac OS local proxy, connect ECONNREFUSED ::1:3000
我有一個在localhost:3000
上運行的 create-react-app 應用程序和一個在localhost:4000
上運行的代理服務器,它將我的一些請求重定向到端口 3000。
請求localhost:3000/
正確返回 index.html 文件,
請求localhost:4000/
返回connect ECONNREFUSED::1:3000
和 502 代碼。
完全相同的設置在 Ubuntu(從 localhost:4000 返回 index.html)和 Windows 上正常工作,所以我確信代理工作正常。
代理是使用https://www.npmjs.com/package/http-proxy構建的,但我無法在文檔中找到任何解決方案。
我的問題是:mac 是否需要更改一些額外的設置才能允許這種流量?
一種解決方案是編輯/etc/hosts
並刪除::1 localhost
映射或將其更改為::1 ip6-localhost
(ubuntu 上的默認設置)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.