0
Fork 0
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:
Simon Backx 2023-08-30 10:12:15 +02:00 committed by GitHub
parent f977227d18
commit c298dd5d38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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')) {