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

feature request: enable CORS #1500

Open
DeVLaB4U opened this issue Mar 26, 2024 · 1 comment
Open

feature request: enable CORS #1500

DeVLaB4U opened this issue Mar 26, 2024 · 1 comment

Comments

@DeVLaB4U
Copy link

I use signal-cli to send messages to Signal in my NUXT3 project and encountered a problem where I cannot use signal-cli directly as a JSON-RPC --http endpoint. If I use 'mode: 'no-cors'', signal-cli gives an error Http 415 Unsupported Media type because with 'mode: 'no-cors'', the header is always set as 'Content-Type' as 'text/plain' and ignores the explicitly specified header 'Content-Type': 'application/json'; otherwise, we have CORS problems if we don't use 'mode: 'no-cors''.

It would be wonderful to include CORS support in your creation.

Thank you very much!

https://developer.mozilla.org/en-US/docs/Glossary/CORS

@AsamK
Copy link
Owner

AsamK commented Mar 28, 2024

signal-cli doesn't have any kind of authentication, so just accessing it from a web browser is not advisable.
I'd suggest putting a webserver like apache or nginx in front which does authentication and can add the CORS headers.

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

No branches or pull requests

2 participants