(key []byte)
| 41 | } |
| 42 | |
| 43 | func newTestHandler(key []byte) *proxyHandler { |
| 44 | return &proxyHandler{ |
| 45 | key: key, |
| 46 | logger: discardLogger(), |
| 47 | forwardCl: &http.Client{}, |
| 48 | allowedHosts: map[string]bool{ |
| 49 | "open.feishu.cn": true, |
| 50 | "accounts.feishu.cn": true, |
| 51 | "mcp.feishu.cn": true, |
| 52 | }, |
| 53 | allowedIDs: map[string]bool{ |
| 54 | sidecar.IdentityUser: true, |
| 55 | sidecar.IdentityBot: true, |
| 56 | }, |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // signedReq creates a properly signed request for testing handler logic past |
| 61 | // HMAC verification. Identity defaults to bot and auth-header to |
no test coverage detected