You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ia3andy
changed the title
Find a sustainable solution for React Create App (RCA) dev server
Find a sustainable solution for dev server with non configurable historyApiFallback
Jun 10, 2022
Currently, it is not possible to configure
historyApiFallback
on:react-scripts start
(from RCA).ng dev
vite dev
Since Quinoa is relying on having a 404 when a file is not found, this is a problem.
For some reason, the library used by those servers for SPA routing is disabled when the
Accept
header is not provided (See https://www.npmjs.com/package/connect-history-api-fallback#htmlacceptheaders).As a workaround, when making the request from Quinoa using the Vert.x Http Client, the
Accept
header is not set. With this the dev server honors 404:https://github.com/quarkiverse/quarkus-quinoa/blob/main/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaDevProxyHandler.java#L63
The best solution would be to have an environment to disable
historyApiFallback
but I've seen many issues asking for it without any resolution yet.The text was updated successfully, but these errors were encountered: