summaryrefslogtreecommitdiffstats
path: root/app/post_test.go
diff options
context:
space:
mode:
authorDerrick Anderson <derrick@andersonwebstudio.com>2018-02-12 15:09:59 -0500
committerDerrick Anderson <derrick@andersonwebstudio.com>2018-02-12 15:09:59 -0500
commitefd620d6c80ddc1f015811ec58514e34ee0b501b (patch)
tree8fdcc1043aba1c9a66382b915f4e185ade1128fb /app/post_test.go
parent87fb19b8279c86c72ffec623e55b80ce35b7d64f (diff)
parent1ae680aefae2deb1e9d07d7c2a1c863ec807a79f (diff)
downloadchat-efd620d6c80ddc1f015811ec58514e34ee0b501b.tar.gz
chat-efd620d6c80ddc1f015811ec58514e34ee0b501b.tar.bz2
chat-efd620d6c80ddc1f015811ec58514e34ee0b501b.zip
Merge branch 'release-4.7' into icu669
Diffstat (limited to 'app/post_test.go')
-rw-r--r--app/post_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/post_test.go b/app/post_test.go
index f5a5a23cb..c8ed726b1 100644
--- a/app/post_test.go
+++ b/app/post_test.go
@@ -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",