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
WebIDE 跑在 Docker里面:
docker run --name webide-coding -p 9090:8080 -v $PWD/.coding-ide-home:/home/coding/.coding-ide-home -d webide/webide
直接使用IP没有问题
Nginx配置
server { listen 443 ssl http2; server_name 马赛克域名; ssl_certificate /etc/letsencrypt/live/马赛克域名/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/马赛克域名/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_prefer_server_ciphers on; ssl_stapling on; root /var/www/html; location / { proxy_headers_hash_max_size 51200; proxy_headers_hash_bucket_size 6400; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://172.20.9.1:9090; } }
域名访问服务,创建workspace会一直卡在 95%那不动,使用内网IP http://172.20.9.1:9090访问可以正常创建服务。在IP方式服务创建成功后,使用域名方式访问,打开项目也会报错:
workspace
95%
http://172.20.9.1:9090
The text was updated successfully, but these errors were encountered:
这是一个 CORS 问题,chrome 在请求时,即使是同源,也会发送 Origin 头,所以这就导致了问题。 这个已经提交了 pr 修复了,参见 Coding/WebIDE-Backend#19
另外使用你的 nginx 配置还需要加上这样的配置,来让 websocket 有效:
proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
Sorry, something went wrong.
tanhe123
No branches or pull requests
WebIDE 跑在 Docker里面:
直接使用IP没有问题
Nginx配置
域名访问服务,创建
workspace
会一直卡在95%
那不动,使用内网IPhttp://172.20.9.1:9090
访问可以正常创建服务。在IP方式服务创建成功后,使用域名方式访问,打开项目也会报错:The text was updated successfully, but these errors were encountered: