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

socket.io is not controlled by HOST_URL #525

Closed
fufenghua opened this issue May 31, 2024 · 2 comments
Closed

socket.io is not controlled by HOST_URL #525

fufenghua opened this issue May 31, 2024 · 2 comments

Comments

@fufenghua
Copy link

fufenghua commented May 31, 2024

`
version: '3.8'

services:
attu:
image: zilliz/attu:v2.4.0
container_name: attu
restart: always
hostname: attu
environment:
- MILVUS_URL=10.15.85.78:19530
- HOST_URL=/attu
ports:
- 5949:3000
`

location /attu/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass https://10.15.86.23:5949/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}

With this configuration, the API interface is normal, but socket.io is abnormal

29cdecd95d7a97ce311d3399aeea347

@shanghaikid shanghaikid added v2.4.1 and removed v2.4.1 labels May 31, 2024
@shanghaikid
Copy link
Collaborator

server {
  listen 8080;
  server_name localhost;

  
  location /attu/ {
    proxy_pass https://localhost:3000/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    rewrite ^/attu/(.*)$ /$1 break;
  }
}

This is a working configuration. I don't think you need to define the HOST_URL as /attu, just define it as the ip or the server name.

@shanghaikid
Copy link
Collaborator

Yes, it should be fixed in the v2.4.4, please upgrade then follow this doc.

https://github.com/zilliztech/attu/blob/main/doc/use-attu-behind-proxy.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants