signal-cli icon indicating copy to clipboard operation
signal-cli copied to clipboard

feature request: enable CORS

Open DeVLaB4U opened this issue 1 year ago • 1 comments

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

DeVLaB4U avatar Mar 26 '24 16:03 DeVLaB4U

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.

AsamK avatar Mar 28 '24 19:03 AsamK