mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -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
13
.github/scripts/dev.js
vendored
13
.github/scripts/dev.js
vendored
|
@ -63,7 +63,18 @@ if (DASH_DASH_ARGS.includes('admin-x') || DASH_DASH_ARGS.includes('adminx') || D
|
|||
prefixColor: '#C35831',
|
||||
env: {}
|
||||
});
|
||||
COMMAND_GHOST.env['adminX__url'] = 'http://localhost:4174/admin-x-settings.umd.js';
|
||||
|
||||
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';
|
||||
}
|
||||
}
|
||||
|
||||
if (DASH_DASH_ARGS.includes('portal') || DASH_DASH_ARGS.includes('all')) {
|
||||
|
|
Loading…
Add table
Reference in a new issue