Error: Unable to open socket
somedevreally opened this issue · 5 comments
somedevreally commented
Hi,
on chrome browser, i was able to add local gotify server with token, after that if i click on browser icon, it says
Error
Unable to open socket
StewartThomson commented
Hi there, did you configure the CORS headers & stream origins for your server, per the README?
somedevreally commented
oh i missed that part, i was so exicted i just went directly to chrome extension page lol..... . ok i added the environment in docker-compose.yml
environment:
- GOTIFY_SERVER_RESPONSEHEADERS: "Access-Control-Allow-Methods: \"GET,POST,OPTIONS\"\nAccess-Control-Allow-Origin: \"chrome-extension://defcailckfpgaigaiijligpnjipkhhmg\"\nAccess-Control-Allow-Headers: \"Authorization, content-type\""
- GOTIFY_SERVER_STREAM_ALLOWEDORIGINS: "- \"defcailckfpgaigaiijligpnjipkhhmg\""
and i get the error when i start the docker container
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.server.environment contains {"GOTIFY_SERVER_RESPONSEHEADERS": "Access-Control-Allow-Methods: \"GET,POST,OPTIONS\"\nAccess-Control-Allow-Origin: \"chrome-extension://defcailckfpgaigaiijligpnjipkhhmg\"\nAccess-Control-Allow-Headers: \"Authorization, content-type\""}, which is an invalid type, it should be a string
StewartThomson commented
Should work if you remove the dashes :)
somedevreally commented
woah, removing dash helped, now the container is up
works like a charm
thanks
StewartThomson commented
No problem! Hopefully, if this gets more users, I might see if the gotify maintainers are interested in hardcoding CORS acceptance of this extension. But we'll see