mirror of
https://github.com/strapi/strapi.git
synced 2025-08-18 13:45:25 +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
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
@ -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(/\/$/, '');
|
||||
}
|
||||
|
@ -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') ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user