I have a global onBeforeHandler, added to the root Elysia instance as the first thing. To the best of my understanding, this means that that handler should run before the route handlers. Yet, for some reason it doesn't for some paths, namely the root index.html and chunk js files. I'm serving a static site built with the Svelte static adapter. There are paths that do go through the handler, such as ones that start with /_app/.
Right now I sidestepped the problem with custom static file serving.
I have a global
onBeforeHandler, added to the root Elysia instance as the first thing. To the best of my understanding, this means that that handler should run before the route handlers. Yet, for some reason it doesn't for some paths, namely the rootindex.htmland chunk js files. I'm serving a static site built with the Svelte static adapter. There are paths that do go through the handler, such as ones that start with/_app/.Right now I sidestepped the problem with custom static file serving.