mirror of
https://github.com/strapi/strapi.git
synced 2025-08-20 06:38:46 +00:00
Merge pull request #3267 from strapi/tech/admin-build-cleanup
Admin build cleanup
This commit is contained in:
commit
43d24e7198
@ -118,9 +118,8 @@ It's very common to deploy the front-end and the back-end on different servers.
|
|||||||
"enabled": false
|
"enabled": false
|
||||||
},
|
},
|
||||||
"admin": {
|
"admin": {
|
||||||
"path": "/dashboard",
|
"path": "/", // Note: The administration will be accessible from the root of the domain (ex: http//yourfrontend.com/)
|
||||||
"build": {
|
"build": {
|
||||||
"host": "/", // Note: The administration will be accessible from the root of the domain (ex: http//yourfrontend.com/)
|
|
||||||
"backend": "http://yourbackend.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
|
"enabled": false
|
||||||
},
|
},
|
||||||
"admin": {
|
"admin": {
|
||||||
|
"path": "/dashboard",
|
||||||
"build": {
|
"build": {
|
||||||
"host": "http://yourfrontend.com/dashboard", // Note: The custom path has moved directly in the host URL.
|
|
||||||
"backend": "http://yourbackend.com"
|
"backend": "http://yourbackend.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,11 +90,7 @@ Object.keys(plugins).forEach(plugin => {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
const remoteURL = (() => {
|
const remoteURL = (() => {
|
||||||
if (window.location.port === '4000') {
|
// Relative URL (ex: /dashboard)
|
||||||
return 'http://localhost:4000/admin';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Relative URL (ex: /dashboard)
|
|
||||||
if (REMOTE_URL[0] === '/') {
|
if (REMOTE_URL[0] === '/') {
|
||||||
return (window.location.origin + REMOTE_URL).replace(/\/$/, '');
|
return (window.location.origin + REMOTE_URL).replace(/\/$/, '');
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ function createPluginsJs(plugins, dest) {
|
|||||||
|
|
||||||
window.strapi = Object.assign(window.strapi || {}, {
|
window.strapi = Object.assign(window.strapi || {}, {
|
||||||
node: MODE || 'host',
|
node: MODE || 'host',
|
||||||
backendURL: BACKEND_URL,
|
backendURL: BACKEND_URL === '/' ? window.location.origin : BACKEND_URL,
|
||||||
languages,
|
languages,
|
||||||
currentLanguage:
|
currentLanguage:
|
||||||
window.localStorage.getItem('strapi-admin-language') ||
|
window.localStorage.getItem('strapi-admin-language') ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user