12 ms·
It's easy but there are decisions made that hamstring you - like being unable to change cache-control headers in the next.config.js or middleware or have your m
by ervine 3y ago
It's easy but there are decisions made that hamstring you - like being unable to change cache-control headers in the next.config.js or middleware or have your middleware use node APIs, which is especially stupid because when self-hosting... it's running in node!
They are optimizing for deploying to the edge, which when self hosting you don't need to.
So whether malicious or not, their guard rails conveniently make it frustrating to self host once you need to do anything outside of their garden.
- leerob 3y agoMiddleware works when self hosting. It's runtime is a subset of Node.js, since it's potentially running in front of every request in your application. We're still evaluating options here: https://github.com/vercel/next.js/discussions/46722#discussioncomment-6709529 https://github.com/vercel/next.js/discussions/46722#discussi...
- ervine 3y agoI never claimed middleware doesn't work when self hosting. I claimed that it's not as useful as it could be, because your company has prioritized edge deployments over supporting self-hosting. As someone in that discussion rightfully says: "We are grown-ups with access to the same tracing and profiling tools as you. There is nothing dangerous about us using Node.js as far as I’m concerned." Additionally, your comment just reeks of PR to me. I don't know if you do it on purpose or what, but to read my comment and then come back with "Middleware works when self hosting"... it has to be intentional on your part to misunderstand my comment that badly.
- verdverm 3y agoWe put nginx in front to manage the cache headers. My biggest gripe is that they made design decisions that are optimized for their paid products, at the expense of the open source. Middleware is the main example, because it has to run on their edge.platform, it has no routing association. For all the magic they do, they dropped the ball here, making you use regex to decide of middleware should be applied. All this because users were getting hit with surprise bills, which is.really a product of who they architected and charged, not a technical issue