diff options
author | Chris <ccbrown112@gmail.com> | 2017-08-09 15:49:07 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-09 13:49:07 -0700 |
commit | ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1 (patch) | |
tree | 5f29ad6b3ae1c26a05a827406e9fe8c0385d26d6 /app/webtrc.go | |
parent | 504582b824d07946c7fb43eb2a8f0aadb15a3677 (diff) | |
download | chat-ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1.tar.gz chat-ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1.tar.bz2 chat-ffbf8e51fe0b80b39fa76535f96c9179b2fcc0a1.zip |
PLT-6358: Server HTTP client improvements (#6980)
* restrict untrusted, internal http connections by default
* command test fix
* more test fixes
* change setting from toggle to whitelist
* requested ui changes
* add isdefault diagnostic
* fix tests
Diffstat (limited to 'app/webtrc.go')
-rw-r--r-- | app/webtrc.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/webtrc.go b/app/webtrc.go deleted file mode 100644 index 76e173651..000000000 --- a/app/webtrc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -package app - -import ( - "encoding/base64" - "net/http" - "strings" - - "github.com/mattermost/platform/model" - "github.com/mattermost/platform/utils" -) - -func RevokeWebrtcToken(sessionId string) { - token := base64.StdEncoding.EncodeToString([]byte(sessionId)) - data := make(map[string]string) - data["janus"] = "remove_token" - data["token"] = token - data["transaction"] = model.NewId() - data["admin_secret"] = *utils.Cfg.WebrtcSettings.GatewayAdminSecret - - rq, _ := http.NewRequest("POST", *utils.Cfg.WebrtcSettings.GatewayAdminUrl, strings.NewReader(model.MapToJson(data))) - rq.Header.Set("Content-Type", "application/json") - - // we do not care about the response - utils.HttpClient().Do(rq) -} |