I’m trying to upgrade from v4 to v5 and am running into issues when bringing up the admin console in development mode. I am running it behind a Traefik reverse proxy in a Docker container and I have it at a subpath for development purposes; such as https://localhost/project/strapi/main/. The error is that it can’t load these sources from the web since localhost is Traefik itself. Below are the 404s that I find when trying to load the admin console.
https://localhost/@vite/client
https://localhost/.strapi/client/app.js
https://localhost/@react-refresh
Examining the admin source, the script source is “/@vite/client”. Is there perhaps a way to not make this source from the root?
Similar problem when I build the app and try to deploy it locally; it gets the js from the root. If I update the source path for the js file in index.html to be relative, it will then give me an error which I think is the React code saying the <Router basename=‘/admin’ doesn’t match the path. I’ve tried setting the urls in the server and admin configs, but to no avail. Is there another setting somewhere for this?
Traefik does strip the path so what gets sent to the Strapi container is “/admin”. I do see a GET request for “/admin”.
Any pointers or insight would be appreciated!
This topic has been created from a Discord post (1302038978018410526) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord