diff options
author | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-02-12 14:13:29 -0500 |
---|---|---|
committer | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-02-12 14:13:29 -0500 |
commit | 3da5df3c90f5888a3490881957befabb37c308d5 (patch) | |
tree | a99a74d6b858d73624c06f85e393acbe97c90586 /app/post_test.go | |
parent | 07fd7aeeb8eb2b198b01b713a4ab57f6352faef2 (diff) | |
parent | 1ae680aefae2deb1e9d07d7c2a1c863ec807a79f (diff) | |
download | chat-3da5df3c90f5888a3490881957befabb37c308d5.tar.gz chat-3da5df3c90f5888a3490881957befabb37c308d5.tar.bz2 chat-3da5df3c90f5888a3490881957befabb37c308d5.zip |
Merge remote-tracking branch 'origin/release-4.7' into release-4.7-t4merge
Diffstat (limited to 'app/post_test.go')
-rw-r--r-- | app/post_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/post_test.go b/app/post_test.go index 3f3783265..409bc043d 100644 --- a/app/post_test.go +++ b/app/post_test.go @@ -190,6 +190,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 @@ -211,6 +215,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", |