I want to connect my SocketIO Client with the Backend. But if i use my Caddy File the Connection fails:
Caddyfile:
www.XXX.XXX:443 {
tls XXX.XXX@XXX.de
root * /srv
route {
reverse_proxy /api* api-server:8443
try_files {path} {path}/ /index.html
file_server
}
}
Client:
socketRef.current = io.connect("https://www.XXX.XXX/api", {
rejectUnauthorized: false,
transports: ["websocket"],
});