Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Error 404 (CORS header ‘Access-Control-Allow-Origin’ missing) when calling /translate #10

Open
jojo58fr opened this issue Mar 22, 2024 · 0 comments

Comments

@jojo58fr
Copy link

jojo58fr commented Mar 22, 2024

Hello !

I want to build a streamelements widget that use OBS-Polyglot. I have test my request through insomnia, it get me a 200 OK with the translation but when i use this code on a widget streamelements, i've got a CORS Error.

Would it be possible to correct this issue ?
Thank you very much for all your hard work on Polyglot.

const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"text":"Bonjour monde.","source_lang":"fr_Latn","target_lang":"eng_Latn"}'
};

fetch('http://127.0.0.1:18080/translate', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

image

On the streamelements widget:
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant