-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow disabling spa middleware #5720
Comments
I'd be happy to create a PR for this but I will wait for some input first, like how the configuration should be done |
reference about disabling middlewares #4640 |
I can only think of one solution which makes sense and that would be a
Or if it is desirable that the default value is false, All other solutions I can think of imply
All which sound quite undesirable |
See #8061. |
Implemented in #8217 |
Clear and concise description of the problem
We are running Vite from Java and to talk to the dev server, we use its http server. We are kind of wanting to run it in middleware mode but cannot use middleware mode directly. In this case, the
viteSpaFallbackMiddleware
is undesireable as the actual SPA part of the application is handled through a Java server and we want to load frontend resources from Vite. Having the spa middleware enable makes it impossible to know if a certain URL refers to a frontend resource or not, as all URLs that do not refer to resources will still return 200 and the index.html contents.Suggested solution
Add an option to disable
viteSpaFallbackMiddleware
even when themiddleware
option is off.Alternative
We are currently removing the middleware by force using something like
It is not pretty
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: