Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caddy Unable Reverse Proxy Server Websocket Response Back To Client Side #4957

Closed
jerrychong25 opened this issue Aug 14, 2022 · 3 comments
Closed
Labels
question ❔ Help is being requested

Comments

@jerrychong25
Copy link

jerrychong25 commented Aug 14, 2022

Hi all,

I would like to reverse proxy client incoming websocket request to HTTP Backend (Node.js App) and vice versa (HTTP Backend websocket request to client side)

I've verified the HTTP Backend that Node.js App is returning correct response back to Caddy server. Also I've tried without Caddy server and Node.js App is responding websocket correctly without any errors.

Unfortunately Caddy server returns 400 Bad Request back to client side on same flow.

How could we resolve this issue since reverse proxy handles all these traffic in background?

I'm using Docker version with following Docker Compose configuraitons:

  https-proxy:
    image: caddy:2.5.2-alpine
    container_name: caddy-https-proxy
    restart: always
    depends_on:
      - proxy
    command: caddy reverse-proxy --from proxy.mydomain.com --to nodejs_app:3000
    volumes:
      - caddy_data:/data
      - caddy_config:/config
    ports:
      - "80:80"
      - "443:443"
    networks:
      - proxy_network

Similar issues:

Thanks in advance!

@francislavoie francislavoie added the question ❔ Help is being requested label Aug 15, 2022
@francislavoie
Copy link
Member

Hi! Thanks for trying Caddy!

Please ask your usage questions on the Caddy community forums. We prefer to keep the GitHub issue board for bugs and feature requests. Don't forget to fill out the thread template so we can help you!

And please use a Caddyfile, enable the debug global option for detailed logs, and post your logs. This is most likely an issue with your app you're proxying to, and not Caddy (400 status is usually from your app, not Caddy).

@jerrychong25
Copy link
Author

Hi! Thanks for trying Caddy!

Please ask your usage questions on the Caddy community forums. We prefer to keep the GitHub issue board for bugs and feature requests. Don't forget to fill out the thread template so we can help you!

And please use a Caddyfile, enable the debug global option for detailed logs, and post your logs. This is most likely an issue with your app you're proxying to, and not Caddy (400 status is usually from your app, not Caddy).

Hi @francislavoie,

For your info, it's confirmed that my Node.js app did not returned the 400 Bad Request response and returns 200 OK instead.

Nertherless, will check which part of Candy server produces this error.

Thanks!

@mholt
Copy link
Member

mholt commented Aug 16, 2022

@jerrychong25 There's simply not enough information given here for us to help you. Please ask on the forum instead and there is a help template that will assist in providing the needed information. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❔ Help is being requested
Projects
None yet
Development

No branches or pull requests

3 participants