Proxy .gif files to the blog too

This commit is contained in:
James Allen 2016-03-07 16:34:34 +00:00
parent f2d62e0653
commit e814dfa7a8

View file

@ -4,15 +4,13 @@ logger = require("logger-sharelatex")
_ = require("underscore")
ErrorController = require "../Errors/ErrorController"
extensionsToProxy = [".png", ".xml", ".jpeg", ".json", ".zip", ".eps"]
module.exports = BlogController =
getPage: (req, res, next)->
url = req.url?.toLowerCase()
blogUrl = "#{settings.apis.blog.url}#{url}"
extensionsToProxy = [".png", ".xml", ".jpeg", ".json", ".zip", ".eps"]
extensionsToProxy = [".png", ".xml", ".jpeg", ".json", ".zip", ".eps", ".gif"]
shouldProxy = _.find extensionsToProxy, (extension)->
url.indexOf(extension) != -1