Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Admin page not working when setting a PUBLIC_URL  #308

Open
@cnmuc

Description

@cnmuc

When setting a PUBLIC_URL via server.js, the admin page opens correctly at https://example.com/strapi/dashboard
However, the javascript files in the HTML page cannot be loaded (cf. screenshot) as the PUBLIC_URL (PUBLIC_ADMIN_URL) seems not to be used.

module.exports = ({ env }) => ({
  host: env('HOST', '0.0.0.0'),
  port: env.int('PORT', 1337),
  url: env('PUBLIC_URL', 'https://example.com/strapi'),
  proxy: env.bool('IS_PROXIED', true),
  admin: {
    auth: {
      secret: env('ADMIN_JWT_SECRET', 'myadminsecret'),
    },
	url: env('PUBLIC_ADMIN_URL', '/dashboard'),
  },
});

image

/admin/runtime~main.d1293aad.js

should be

/strapi/dashboard/runtime~main.d1293aad.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions