DBJ
DBJ
CCoder.com
Created by DBJ on 8/6/2024 in #help
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!
4 replies