Daniel Schalla
7ac5715a02
[MM-14333] Stricten external HTTP Calls to require that own IPs need to be explicitly whitelisted ( #10375 )
...
* Stricten external HTTP Calls to require that own IPs need to be explicitly whitelisted
* gofmt
* Documentation; Style fixes for IsOwnIP function
2019-03-01 16:22:24 +01:00
Harrison Healey
1a3ccaf305
MM-13606 Remove consumeAndClose and clean up integration response handling ( #10066 )
...
* MM-13606 Remove consumeAndClose
* Allow overriding HTTPService's request timeout
* MM-13606 Clean up integration response handling
* Properly close httptest servers
* Address feedback
* Only call buf.Bytes when necessary
* Properly check for errors in doOutgoingWebhookRequest
* Add comment explaining ignored ioutil.ReadAll errors
2019-01-09 17:07:08 -05:00
Harrison Healey
749a3e7538
MM-10417 Improve HTTPService for use in image proxy ( #9966 )
...
* Replaced httpservice with proper http.Client
* Added HTTPService.MakeTransport
* Expose timeouts used by HTTPServiceImpl
* Add additional documentation to HTTPService
* Remove MockedHTTPService
* Fix missing license
2018-12-12 11:39:14 -05:00
Andreas Linz
cf9b9802a8
Set a proper HTTP user-agent header ( #9482 )
...
Previously, mattermost-server would always request with the default
user-agent of Go's net/http package that is `Go-http-client/1.1` or
something similar.
This has several disadvantages, one is that the default user-agent
made it pretty hard to distinguish mattermost requests from other
service requests in a network log for example.
Now a user-agent of the form `mattermost-<current-version>` is set in
the client.
- [x] Added or updated unit tests (required for all new features)
2018-10-03 10:28:44 -07:00
Harrison Healey
4e59a27293
Move HTTPService and ConfigService into services package ( #9422 )
...
* Move HTTPService and ConfigService into utils package
* Re-add StaticConfigService
* Move config and http services into their own packages
2018-09-26 12:42:51 -04:00