Closed devfelipereis closed 3 years ago
Hello, @devfelipereis, I understand your opinion, but what do you think in create two Dio Clients? I like this approach in my projects. You can resolve the client using Dependence Injection for example.
And you need to pinning all certificates to works different endpoints in the same app. This is interesting if both of endpoints belongs to you.
Yeah... seens to be better and we can have more control, diferrent configs for each client. Thank you!
Hello.
Sometimes we can make requests for some apis that is not using the base url and pass the full url to dio. Ex: baseUrl = https://google.com.br/api/ a request outside the baseUrl: https://twitter.com/api/
When doing this, the interceptor will only validates the baseUrl and let the others pass.
Using options.uri will check for the url that is being requested.
What do you think?
Thank you!
EDIT: Pull request https://github.com/diefferson/http_certificate_pinning/pull/5
EDIT 2:
We could also check for origin. In the twitter example, we will get only https://twitter.com