Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/CommandCodeAI/BaseAI
/ preFlight
Function
preFlight
packages/baseai/src/dev/middleware/pre-flight.ts:3–10 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
1
import
{MiddlewareHandler} from
'hono'
;
2
3
export
const
preFlight = (): MiddlewareHandler => {
4
return
async
function
preFlight(c, next) {
5
if
(c.req.method ===
'OPTIONS'
) {
6
return
new
Response(null);
7
}
8
await
next();
9
};
10
};
Callers
1
runBaseServer
Function · 0.90
Calls
1
next
Function · 0.50
Tested by
no test coverage detected