mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed cors error for image editor
refs https://github.com/TryGhost/Team/issues/3034 - while fetching the image from source for editing in the image editor, it throws cors error when the image is returned from cache instead of ghost server - the cached image response causes cors to trip over if admin url is different from frontend url for site as it doesn't has the right header - adds a dynamic `v=...` query param while fetching image in editor to bypass cache and fetch image from server directly
This commit is contained in:
parent
e00bb48f61
commit
9e268009da
1 changed files with 2 additions and 1 deletions
|
@ -113,8 +113,9 @@ export default class KoenigImageEditor extends Component {
|
|||
@action
|
||||
async handleClick() {
|
||||
if (window.pintura) {
|
||||
const imageSrc = `${this.args.imageSrc}?v=${Date.now()}`;
|
||||
const editor = window.pintura.openDefaultEditor({
|
||||
src: this.args.imageSrc,
|
||||
src: imageSrc,
|
||||
util: 'crop',
|
||||
utils: [
|
||||
'crop',
|
||||
|
|
Loading…
Add table
Reference in a new issue