0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

🐛 Fixed blank branding preview on split front-end/admin domain setups

no issue

- the POST request made to fetch the preview was going to the non-trailing-slash version of the site URL which was resulting in a redirect to the trailing-slash version which then failed due to CORS
This commit is contained in:
Kevin Ansfield 2021-06-01 10:46:28 +01:00
parent 167a18deaf
commit 66f6d25d4b

View file

@ -142,7 +142,9 @@ export default class GhBrandSettingsFormComponent extends Component {
'x-ghost-preview': this.previewData
}
};
const frontendUrl = this.config.get('blogUrl');
// TODO: config.blogUrl always removes trailing slash - switch to always have trailing slash
const frontendUrl = `${this.config.get('blogUrl')}/`;
const previewContents = yield this.ajax.post(frontendUrl, ajaxOptions);
// inject extra CSS to disable navigation and prevent clicks