Hello Danny,
sorry, my fault.

The root of the problem is related to the use of ReactRouter, more on
how to fix here:
https://stackoverflow.com/questions/53207059/react-nginx-routing-to-subdirectory

Once fixed the subfolders into the react app also the routing through
apisix works fine.

Thanks,
Alessio

On Tue, Aug 27, 2024 at 5:12 PM danny dun <dannydun...@gmail.com> wrote:
>
> Maybe you need to provide more information, such as route config detail,
> request sample with curl command
>
>
> Alessio Bernesco Làvore <alessio.berne...@gmail.com>于2024年8月26日 周一23:21写道:
>
> > Hello!
> >
> > I've a simple Vite/React app, dockerized with an Nginx frontend.
> >
> > If i call the application directly everything works fine, but if i
> > call it through a simple route with a rewrite (es. apisix:9080/myapp/)
> > the app is not working.
> >
> > The request/response through the developer console are identical, same
> > requests, same response, but looks like the root js script in the
> > index.html file was not executed.
> >
> > Calls to every single file are working fine and there's any error in
> > the console or network view of the developer tools, so it seems that
> > any part (js, css, etc) are correctly retrieved through apisix.
> >
> > I'm quite clueless right now...
> >

Reply via email to