iachat/app/models/channel
Vinay Keerthi f1079574e3
fix: Disable SSL verification for LINE webhooks in development (#12960)
## Summary

- Fixes SSL certificate verification errors when testing LINE webhooks
in development environments
- Configures the LINE Bot API client to skip SSL verification only in
development mode

## Background

When testing LINE webhooks locally on macOS, the LINE Bot SDK was
failing with:
```
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get certificate CRL)
```

This occurs because the LINE Bot SDK tries to fetch user profiles via
HTTPS, and OpenSSL on macOS development environments may not have proper
access to Certificate Revocation Lists (CRLs).

## Changes

- Added `http_options` configuration to the LINE Bot client in
`Channel::Line#client`
- Sets `verify_mode: OpenSSL::SSL::VERIFY_NONE` only when
`Rails.env.development?` is true
- Production environments continue to use full SSL verification for
security

## Test Plan

- [x] Send a LINE message to trigger webhook in development
- [x] Verify webhook is processed without SSL errors
- [x] Confirm change only applies in development mode

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-11-26 22:38:26 +05:30
..
api.rb chore: Centralize outgoing message reply restrictions for all the channels (#11279) 2025-04-12 08:52:12 +05:30
email.rb feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
facebook_page.rb feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
instagram.rb feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
line.rb fix: Disable SSL verification for LINE webhooks in development (#12960) 2025-11-26 22:38:26 +05:30
sms.rb feat: hide CSAT survey URLs from agents in dashboard (#11622) 2025-06-11 23:39:47 +05:30
telegram.rb feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
twilio_sms.rb feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
twitter_profile.rb feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
web_widget.rb feat: Introduce allowed_domains for web widget (#12450) 2025-09-17 10:01:27 +05:30
whatsapp.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30