(origin: string | undefined)
| 43 | |
| 44 | // Only the known UI clients' own origins may drive the engine from a browser context. |
| 45 | // A request with no Origin is a non-browser client (the CLI / curl); browsers |
| 46 | // always send one, so an unexpected Origin is a hostile web page — rejected. |
| 47 | const ALLOWED_ORIGINS = new Set([ |
| 48 | 'http://localhost:1420', |
| 49 | 'http://127.0.0.1:1420', |