Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Initial g1t: services, event bus, intents and attempts | 1 | import { createRequestHandler } from "react-router"; |
| 2 | ||
| 3 | const requestHandler = createRequestHandler( | |
| 4 | () => import("virtual:react-router/server-build"), | |
| 5 | import.meta.env.MODE, | |
| 6 | ); | |
| 7 | ||
| 8 | const GIT_PATH = /\/(info\/refs|git-upload-pack|git-receive-pack)$/; | |
| 9 | ||
| 10 | export default { | |
| 11 | async fetch(request, env) { | |
| 12 | // Git over HTTPS shares this hostname but belongs to the repos service. | |
| 13 | if (GIT_PATH.test(new URL(request.url).pathname)) { | |
| 14 | return env.REPOS.fetch(request); | |
| 15 | } | |
| 16 | return requestHandler(request); | |
| 17 | }, | |
| 18 | } satisfies ExportedHandler<Env>; |