photopea / photopea

Photopea is online image editor
https://www.Photopea.com
7.44k stars 269 forks source link

No 'Access-Control-Allow-Origin' #7120

Closed vedantdere closed 1 month ago

vedantdere commented 1 month ago

Your Operating System: Linux Your Web Browser: Chrome The problem happens in the Incognito Mode, too: Yes

I am using the photopea api. photopea is send response to my server without header for Access-Control-Allow-Origin. Below is the log of the error

www.photopea.com/#%7B%22files%.......%  
Access to XMLHttpRequest at 'https://domain.me/save_images' 
from origin 'https://www.photopea.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Please add 'Access-Control-Allow-Origin' in the response.

photopea commented 1 month ago

Hi, only the servers can have the CORS headers, not clients. Only you can fix it on your server.

vedantdere commented 1 month ago

The request is coming from photopea end without headers thats why my endpoint is not accepting.

photopea commented 1 month ago

that is not how CORS works.

photopea commented 1 month ago

I have to close it because of lack of details :(