fetch() API socket hang up

Hello, I am running code-server in docker behind caddy2 as a reverse proxy and can access my website with the node.js http-server as backend at https://domain.com/proxy/5050/index.html. My website also includes an API endpoint which is working fine locally in vs-code at http://127.0.0.1:5000/api/user. However I have issues now while using code-server when I change my endpoint to http://domain.com/proxy/5000/api/user in which I receive a socket hang up message after loading the page for quite some time. The network tab in the developer console of my browser shows 0 transferred bytes. I assume the issue relies in that code-server is only forwarding https://domain.com/proxy/5000 and not the following sub-path for the endpoint. Does anyone know how I would have to change my setup that it will work with code-server? Thank you very much for your replies!
3 Replies
Codercord
Codercord5mo ago
<#1270314525597503570>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
Phorcys
Phorcys5mo ago
hello, please open an issue over at the code-server repo since this seems like a bug https://github.com/coder/code-server/issues
GitHub
Issues · coder/code-server
VS Code in the browser. Contribute to coder/code-server development by creating an account on GitHub.
Codercord
Codercord5mo ago
@Phorcys closed the thread.

Did you find this page helpful?