I created a node.js server to host my Vue 3 front end and can successfully get data from the Strapi /api calls after allowing permission. What I can’t seem to do is get the admin panel to work using a proxy. This is what I am trying to do with node. The app.get works just fine for the data API. The admin does not work.
app.get('/api/*', (req, res) => {
proxy.web(req, res, { target: `http://localhost:1337${req.url}` })
})
app.all('/admin*', (req, res) => {
proxy.web(req, res, { target: `http://localhost:1337/admin` })
})
It works in that it sends me directly to the register route http://localhost:3000/admin/auth/register-admin
If I try to get to /auth/login, it immediately redirects me back to the register route. Is it possible to use the service through a proxy in Node like I am attempting to do? No matter how I modify including trying to get it to send me directly to /admin/auth/login, it still redirects me back to register.
System Information
- Strapi Version: Latest
- Operating System: Windows 11
- Database:
- Node Version: 20
- NPM Version:
- Yarn Version: