Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images with CORS fail in custom server mode #6

Open
corbindavenport opened this issue Sep 1, 2024 · 0 comments
Open

Images with CORS fail in custom server mode #6

corbindavenport opened this issue Sep 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@corbindavenport
Copy link
Owner

If an image is on a server with a CORS same origin policy (example), it doesn't work in custom server mode, because Alt Text Generator can't fetch it again to convert to base64:

Recieved page from context menu: 
Object { menuItemId: "generate-alt", parentMenuItemId: 855, viewType: "tab", mediaType: "image", frameId: 0, editable: false, srcUrl: "https://hfu.hollywoodfeed.com/wp-content/uploads/2024/03/GettyImages-496236528-scaled.jpg", pageUrl: "https://hfu.hollywoodfeed.com/wp-content/uploads/2024/03/GettyImages-496236528-scaled.jpg", modifiers: [], button: 0 }
[background.js:220:11](moz-extension://3b9ede34-aea6-4eb7-b105-ac8d18a826bb/js/background.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://hfu.hollywoodfeed.com/wp-content/uploads/2024/03/GettyImages-496236528-scaled.jpg. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.

Ideally this should be fixed, if not then a better error message would be helpful instead of just failing silently or showing messages in the LM Studio logs.

@corbindavenport corbindavenport added the bug Something isn't working label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant