升级Kong 1.1.1到1.2.0后,原来工作正常的WebSocket连接不上了,前端提示:’Upgrade’ header is missing Server端提示: System.Net.WebSockets.WebSocketException (2): The remote party closed the WebSocket connection without completing the close handshake. Google了下应该是Kong 1.2.0的bug: Websocket Upgrade header missing after upgrade to 1.2.0 kong 1.2.1 websocket fail fix(proxy) do not clear upgrade header (case-insensitive), fix #4779 #4780 但Milestone是1.2.2, 还没有发布. 紧急有效的修复方法是从github中拿到修复后的handler.lua文件, 创建configmap: apiVersion: v1 data: handler.lua: |- -- Kong runloop -- -- …
Category: kong
[Kong] Batch change SNIs’ certificate
Kong 0.13.1, I have a few snis bind to a cert which will be expired soon. So write a sh to bind these snis to a new cert (need install jq first): #!/bin/sh SNIS=`curl -s "http://kong-admin.kong:8001/snis"` LEN=`echo $SNIS | jq '.data | length'` # bash # for (( i=0; i<LEN; i++ )) for i in …