New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding curl-options #14
Comments
Hi @knallcharge, thanks for creating this issue. No, currently the library does not allow configuring the cURL options. There might be a better way to resolve your problem, by fixing your SSL certificate set up, as described in the StackOverflow answers here. Disabling SSL verification exposes you to security vulnerabilities, so it is best avoided. That said, yes we can add this functionality in future. |
Hi @daniel-jones-deepl |
Hi @knallcharge , does the new feature to specify a custom HTTP client accomodate your use case? Im afraid to specify cURL options you will need to use a PSR-18 wrapper for cURL, but with that it should work. I provided an example how to use the new option in the README. |
Hi @JanEbbing, thanks for the hint. Just tried it (using Symfony's Psr18Client) and it works! I'll still have to do some tests in a different environment, but this should be resolved. Thanks again, closing this. |
Hi,
is there a way to add curl-options when instantiating the Translator?
I need to include verify_peer: false and verify_host: false, otherwise I'll get a "SSL certificate error: unable to get local issuer certificate"-exception.
I have tried
$translator = new \DeepL\Translator('KEY', ['headers' => ['verify_peer' => false, 'verify_host' => false]]);
but that doesn't work (same with "0" instead of "false" for both options).
I see the options getting added to
$curlOptions
inHttpClient
(line 182), but they don't seem to do anything.Thanks
The text was updated successfully, but these errors were encountered: