diff --git a/src/lua/header_filter.lua b/src/lua/header_filter.lua index 295d395..d7c3d17 100644 --- a/src/lua/header_filter.lua +++ b/src/lua/header_filter.lua @@ -11,10 +11,11 @@ if ngx.header["Content-Type"] then content_type:find("text/xml") or content_type:find("application/javascript") or content_type:find("application/json") or - content_type:find("application/rss+xml") or - content_type:find("application/atom+xml") or - content_type:find("application/vnd.mpegurl") or - content_type:find("application/x-mpegurl") then + content_type:find("application/rss%+xml") or + content_type:find("application/atom%+xml") or + content_type:find("application/vnd%.mpegurl") or + content_type:find("application/x%-mpegurl") then + ngx.log(ngx.DEBUG, "Enabling rewrite due to content type " .. content_type) ngx.ctx.rewriting = true ngx.header["Content-Length"] = nil -- We're rewriting the body so this has the wrong value if set end