summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
authorChristopher Brown <ccbrown112@gmail.com>2018-02-09 20:08:39 -0600
committerChristopher Brown <ccbrown112@gmail.com>2018-02-09 20:08:39 -0600
commitc1b6e8792c9f91c66c35737438c20757ef43066f (patch)
tree6185a06ef39be33c7128ea335c656deddd626419 /app/post.go
parent396e7513ecc7d86b04e56745586c802e56e5d763 (diff)
downloadchat-c1b6e8792c9f91c66c35737438c20757ef43066f.tar.gz
chat-c1b6e8792c9f91c66c35737438c20757ef43066f.tar.bz2
chat-c1b6e8792c9f91c66c35737438c20757ef43066f.zip
minor addition to #8238
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/post.go b/app/post.go
index 5b0e59b23..be9374e10 100644
--- a/app/post.go
+++ b/app/post.go
@@ -894,14 +894,10 @@ func (a *App) ImageProxyAdder() func(string) string {
}
return func(url string) string {
- if url == "" || strings.HasPrefix(url, siteURL) || strings.HasPrefix(url, proxyURL) {
+ if url == "" || url[0] == '/' || strings.HasPrefix(url, siteURL) || strings.HasPrefix(url, proxyURL) {
return url
}
- if url[0] == '/' {
- url = siteURL + url[1:]
- }
-
switch proxyType {
case "atmos/camo":
mac := hmac.New(sha1.New, []byte(options))