mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added support to run Admin-X development over HTTPS in Safari (#17866)
no issue Safari requires HTTPs for admin X to work in development mode. Use `yarn dev --https` in combination with a caddy server to make it work. ``` https://localhost:41740 { reverse_proxy http://localhost:4174 } ```
This commit is contained in:
parent
f977227d18
commit
c298dd5d38
1 changed files with 12 additions and 1 deletions
11
.github/scripts/dev.js
vendored
11
.github/scripts/dev.js
vendored
|
@ -63,8 +63,19 @@ if (DASH_DASH_ARGS.includes('admin-x') || DASH_DASH_ARGS.includes('adminx') || D
|
||||||
prefixColor: '#C35831',
|
prefixColor: '#C35831',
|
||||||
env: {}
|
env: {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (DASH_DASH_ARGS.includes('https')) {
|
||||||
|
// Safari needs HTTPS for it to work
|
||||||
|
// To make this work, you'll need a CADDY server running in front
|
||||||
|
// Note the port is different because of this extra layer. Use the following Caddyfile:
|
||||||
|
// https://localhost:41740 {
|
||||||
|
// reverse_proxy http://localhost:4174
|
||||||
|
// }
|
||||||
|
COMMAND_GHOST.env['adminX__url'] = 'https://localhost:41740/admin-x-settings.umd.js';
|
||||||
|
} else {
|
||||||
COMMAND_GHOST.env['adminX__url'] = 'http://localhost:4174/admin-x-settings.umd.js';
|
COMMAND_GHOST.env['adminX__url'] = 'http://localhost:4174/admin-x-settings.umd.js';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (DASH_DASH_ARGS.includes('portal') || DASH_DASH_ARGS.includes('all')) {
|
if (DASH_DASH_ARGS.includes('portal') || DASH_DASH_ARGS.includes('all')) {
|
||||||
commands.push({
|
commands.push({
|
||||||
|
|
Loading…
Add table
Reference in a new issue