screenshot-to-code icon indicating copy to clipboard operation
screenshot-to-code copied to clipboard

Prefix http/https for URLs to screenshot

Open onurbbb opened this issue 2 years ago • 5 comments

Access to fetch at 'https://backend-screenshot-to-code.onrender.com/api/screenshot' from origin 'https://picoapps.xyz' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

onurbbb avatar Nov 28 '23 20:11 onurbbb

Typically, that's an indication of a different error. Can you double check your Screenshot One key?

abi avatar Nov 29 '23 10:11 abi

Typically, that's an indication of a different error. Can you double check your Screenshot One key?

No issues on screenshot one api key, just checked it and works on their playground. This is the error I get on hosted version with fresh generated api key. Screenshot 2023-11-29 at 1 03 57 PM

onurbbb avatar Nov 29 '23 21:11 onurbbb

Can you try running the local version instead?

abi avatar Nov 30 '23 15:11 abi

Oooh I found the issue lol. If you manually enter url without https:// part it just does not work. So lets say if you try google.com it throws an error. Should be easy fix with regex...

onurbbb avatar Dec 01 '23 21:12 onurbbb

Ah that makes sense. Will fix!

abi avatar Dec 02 '23 02:12 abi