Merge branch 'release-4.7' into icu669

Этот коммит содержится в:
Derrick Anderson
2018-02-12 15:09:59 -05:00
родитель 87fb19b827 1ae680aefa
Коммит efd620d6c8
91 изменённых файлов: 1527 добавлений и 1234 удалений

Просмотреть файл

@@ -192,6 +192,10 @@ func TestImageProxy(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.SiteURL = "http://mymattermost.com"
})
for name, tc := range map[string]struct {
ProxyType string
ProxyURL string
@@ -213,6 +217,18 @@ func TestImageProxy(t *testing.T) {
ImageURL: "http://mydomain.com/myimage",
ProxiedImageURL: "https://127.0.0.1/x1000/http://mydomain.com/myimage",
},
"willnorris/imageproxy_SameSite": {
ProxyType: "willnorris/imageproxy",
ProxyURL: "https://127.0.0.1",
ImageURL: "http://mymattermost.com/myimage",
ProxiedImageURL: "http://mymattermost.com/myimage",
},
"willnorris/imageproxy_PathOnly": {
ProxyType: "willnorris/imageproxy",
ProxyURL: "https://127.0.0.1",
ImageURL: "/myimage",
ProxiedImageURL: "/myimage",
},
"willnorris/imageproxy_EmptyImageURL": {
ProxyType: "willnorris/imageproxy",
ProxyURL: "https://127.0.0.1",