浏览代码

rpc: fixup change to not verify websocket origin (#19128)

This corrects the previous change which broke the build and
was pushed by accident.
Felix Lange 6 年之前
父节点
当前提交
d2256244c4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rpc/websocket.go

+ 1 - 1
rpc/websocket.go

@@ -129,7 +129,7 @@ func wsHandshakeValidator(allowedOrigins []string) func(*websocket.Config, *http
 		// Origin. Non-browser software can put anything in origin and checking it doesn't
 		// provide additional security.
 		if _, ok := req.Header["Origin"]; !ok {
-			return
+			return nil
 		}
 		// Verify origin against whitelist.
 		origin := strings.ToLower(req.Header.Get("Origin"))