diff options
author | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-02-12 14:50:52 -0500 |
---|---|---|
committer | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-02-12 14:50:52 -0500 |
commit | d88d2bc2ed3aefa68b5ed2942f493ae42bb40bfa (patch) | |
tree | a99a74d6b858d73624c06f85e393acbe97c90586 /app/post_test.go | |
parent | 07fd7aeeb8eb2b198b01b713a4ab57f6352faef2 (diff) | |
parent | 3da5df3c90f5888a3490881957befabb37c308d5 (diff) | |
download | chat-d88d2bc2ed3aefa68b5ed2942f493ae42bb40bfa.tar.gz chat-d88d2bc2ed3aefa68b5ed2942f493ae42bb40bfa.tar.bz2 chat-d88d2bc2ed3aefa68b5ed2942f493ae42bb40bfa.zip |
Merge branch '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", |