development, Teamcity

用nginx 代理Teamcity 解决 “Some users cannot use optimized web UI updates via WebSocket protocol”的问题

By jere on 2017-02-24 0 Comments

用了Nginx 直接http_pass http://teamcity:8080 后,可能出现如下问题
Some users cannot use optimized web UI updates via WebSocket protocol.

让Nginx 支持websocket

请看这篇文章

在http下添加

map $http_upgrade $connection_upgrade {
    default upgrade;
    '' close;
}

site的config里

location / {
  proxy_pass http://teamcity:8080;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
}
打赏

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注