-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Use a proxy ? #59
Comments
If you are agree with #60 , I could use my own ProjectFactory class to define the proxy. class ProjectFactory extends \Kreait\Firebase\Symfony\Bundle\DependencyInjection\Factory\ProjectFactory
{
public function createFactory(array $config = []): Factory
{
$factory = parent::createFactory($config);
$httpClientOptions = HttpClientOptions::default();
$httpClientOptions = $httpClientOptions->withGuzzleConfigOptions([
'proxy' => 'http://proxy',
]);
return $factory->withHttpClientOptions($httpClientOptions);
}
} |
I decided not to use the bundle. There are some issues and I can't override configurations. I share my config for a messaging usage with an unique client : ####
# Kreait Firebase
####
kreait_firebase.http_config_options:
class: Kreait\Firebase\Http\HttpClientOptions
factory: ['Kreait\Firebase\Http\HttpClientOptions', 'default']
calls:
- withProxy: !returns_clone ['%env(HDS_HTTP_PROXY)%']
Kreait\Firebase\Factory:
calls:
- withHttpClientOptions: !returns_clone ['@kreait_firebase.http_config_options']
- withServiceAccount: !returns_clone ['%env(resolve:FIREBASE_CREDENTIALS_PATH)%']
- withHttpLogger: !returns_clone ['@monolog.logger.firebase']
Kreait\Firebase\Contract\Messaging:
factory: ['@Kreait\Firebase\Factory', 'createMessaging'] |
Good call, that's how I would recommend it anyway - perhaps I should update the README at some point... Anyway, thanks for sharing, it will certainly be useful to others. I'll keep this and/or the other issue open for the time being, perhaps I can find some time somewhen. |
Since you've given an example how to use the SDK without this bundle (again: 👏), and I've merged #60, I'll close this issue now, but feel free to add further comments if you'd like. |
Describe the feature you would like to see
Hello,
Could you add the possibility yo use a proxy ?
Maybe add a http client config in the bundle configuration ?
Do you already have a solution ?
Ty
The text was updated successfully, but these errors were encountered: