jpeg -> json

This commit is contained in:
Henry Oswald 2017-03-20 11:08:42 +00:00 committed by GitHub
parent 625fa810c2
commit ca3849c0c2

View file

@ -10,7 +10,7 @@ module.exports = BlogController =
url = req.url?.toLowerCase() url = req.url?.toLowerCase()
blogUrl = "#{settings.apis.blog.url}#{url}" blogUrl = "#{settings.apis.blog.url}#{url}"
extensionsToProxy = [".png", ".xml", ".jpeg", ".jpeg", ".jpg", ".zip", ".eps", ".gif"] extensionsToProxy = [".png", ".xml", ".jpeg", ".jpg", ".json", ".zip", ".eps", ".gif"]
shouldProxy = _.find extensionsToProxy, (extension)-> shouldProxy = _.find extensionsToProxy, (extension)->
url.indexOf(extension) != -1 url.indexOf(extension) != -1
@ -42,4 +42,4 @@ module.exports = BlogController =
upstream = request.get(originUrl) upstream = request.get(originUrl)
upstream.on "error", (error) -> upstream.on "error", (error) ->
logger.error err: error, "blog proxy error" logger.error err: error, "blog proxy error"
upstream.pipe res upstream.pipe res