chatwoot / chatwoot

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
https://www.chatwoot.com/help-center
Other
21.38k stars 3.63k forks source link

adding local address as webhook #7697

Open dearkafka opened 1 year ago

dearkafka commented 1 year ago

Is your feature or enhancement related to a problem? Please describe.

Right now it's impossible to use local addresses in webhook, there was discussion about it https://github.com/chatwoot/chatwoot/issues/5999 but the thing is if chatwoot is deployed e.g. via docker compose, you have internal domain names such as chatwoot:8000, defined by docker internally. So actually we can use them and that would be handy.

Describe the solution you'd like

add ability to use arbitrary names at webhook url

Describe alternatives you've considered

ngrok and other tunnelling greatly complicates the pipeline

Additional context

No response

pranavrajs commented 1 year ago

@dearkafka Thanks for the suggestion. This seems like a reasonable ask.

We can add the support for IP and port in the URL. However, adding a random name if it doesn't conform to the usual http URL standards cannot be supported at the moment as it would risk our Cloud version.

Happy to accept PRs if any in the community can take it forward.

dearkafka commented 1 year ago

well, I dont know ruby enough. However I found a solution that may work if anyone uses docker compose (to all the readers of this issue in future)

you can add a network alias name that can resemble domain name. let's say we have webhook service in compose file:

  webhook:
    build:
      context: .
      dockerfile: webhook.dockerfile
    ports:
      - "8001:8001"
    networks:
      default:
      webhook_net:
        aliases:
          - webhook.local

and then network block smth like that

networks:
  webhook_net:
    driver: bridge

so you can use webhook.local:8001

1saifj commented 3 months ago

@dearkafka Thanks for the suggestion. This seems like a reasonable ask.

We can add the support for IP and port in the URL. However, adding a random name if it doesn't conform to the usual http URL standards cannot be supported at the moment as it would risk our Cloud version.

Happy to accept PRs if any in the community can take it forward.

We need it!