diff --git a/docs/3.0.0-beta.x/advanced/customize-admin.md b/docs/3.0.0-beta.x/advanced/customize-admin.md index cde17e6446..5db4df0f71 100644 --- a/docs/3.0.0-beta.x/advanced/customize-admin.md +++ b/docs/3.0.0-beta.x/advanced/customize-admin.md @@ -118,9 +118,8 @@ It's very common to deploy the front-end and the back-end on different servers. "enabled": false }, "admin": { - "path": "/dashboard", + "path": "/", // Note: The administration will be accessible from the root of the domain (ex: http//yourfrontend.com/) "build": { - "host": "/", // Note: The administration will be accessible from the root of the domain (ex: http//yourfrontend.com/) "backend": "http://yourbackend.com" } } @@ -146,8 +145,8 @@ In this case, we suppose that you decided to put your administration panel on a "enabled": false }, "admin": { + "path": "/dashboard", "build": { - "host": "http://yourfrontend.com/dashboard", // Note: The custom path has moved directly in the host URL. "backend": "http://yourbackend.com" } } diff --git a/packages/strapi-admin/admin/src/app.js b/packages/strapi-admin/admin/src/app.js index e2237060e1..d3b2707245 100644 --- a/packages/strapi-admin/admin/src/app.js +++ b/packages/strapi-admin/admin/src/app.js @@ -90,11 +90,7 @@ Object.keys(plugins).forEach(plugin => { // TODO const remoteURL = (() => { - if (window.location.port === '4000') { - return 'http://localhost:4000/admin'; - } - - // Relative URL (ex: /dashboard) + // Relative URL (ex: /dashboard) if (REMOTE_URL[0] === '/') { return (window.location.origin + REMOTE_URL).replace(/\/$/, ''); } diff --git a/packages/strapi-admin/index.js b/packages/strapi-admin/index.js index b23d019053..f95ef139ef 100644 --- a/packages/strapi-admin/index.js +++ b/packages/strapi-admin/index.js @@ -15,7 +15,7 @@ function createPluginsJs(plugins, dest) { window.strapi = Object.assign(window.strapi || {}, { node: MODE || 'host', - backendURL: BACKEND_URL, + backendURL: BACKEND_URL === '/' ? window.location.origin : BACKEND_URL, languages, currentLanguage: window.localStorage.getItem('strapi-admin-language') ||