diff --git a/core/elasticsearch.md b/core/elasticsearch.md index 53b9db80951..cadf83238df 100644 --- a/core/elasticsearch.md +++ b/core/elasticsearch.md @@ -47,6 +47,33 @@ api_platform: #... ``` +#### SSL Configuration + +When connecting to Elasticsearch over HTTPS with self-signed certificates or custom Certificate Authorities, you can configure SSL verification. + +**With a custom CA bundle:** + +```yaml +# config/packages/api_platform.yaml +api_platform: + elasticsearch: + hosts: ['%env(ELASTICSEARCH_HOST)%'] + ssl_ca_bundle: '/path/to/ca-bundle.crt' +``` + +**Disable SSL verification (dev/test only):** + +```yaml +# config/packages/api_platform.yaml +api_platform: + elasticsearch: + hosts: ['%env(ELASTICSEARCH_HOST)%'] + ssl_verification: false # Never use in production +``` + +> [!NOTE] +> You cannot use both options together. + ### Enabling Reading Support using Laravel ```php