-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
Bug report
Required System information
- Node.js version: v18
- Strapi version: 5.0.0-rc.17
- Database: postgres
- Operating system: Linux
- Is your project Javascript or Typescript: Typescript
Describe the bug
Installing Strapi in a Sub-Path on a Server (f.e. https://rooturl.tld/backend) seems nearly unpossible. In a fresh install with server config url: https://rooturl.tld/backend/ and admin config admin-url: /admin (at build-time and runtime) the admin page generally loads (http 200) in /backend/admin, but the resources are loaded from the root path (https://rooturl.tld/strapi-BA4UeQmR.js). This leads to 404 and a blank page.
Steps to reproduce the behavior
- Build Strapi with ENV URL=https:/rooturl.tld/backend/, ENV ADMIN_URL=/admin
- Run Container
- Admin Page is blank because js resources could not be loaded
Expected behavior
The resources should not ignore server-paths.
Code snippets
We are running strapi in a kubernetes cluster and have a rewrite in our virtual service:
- name: "backend-routes"
match:
- uri:
prefix: "/backend/"
rewrite:
uri: "/"
route:
- destination:
host: strapi-backend
port:
number: 1337
We already tried nearly all permutations in rewriting, ENV URL/ADMIN URL setting (like ADMIN_URL=/backend/admin) etc., but the initial javascript is always requested from the root url.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status