A rails route like '/foo/bar' will not be matched by an internal ESI request if it has a query param on the end as I believe the internally-constructed rack request isn't handling query strings correctly.
So /foo/bar works fine. /foo/bar?baz=42 doesn't inside the ESI logic but does from the outside.
Since we only use Rack::ESI in development, I've monkeypatched like this to let Rack do all the heavy lifting for us...
module Rack
class ESI
def get_local_fragment(env, src)
get_remote_fragment(env, "http://#{env['HTTP_HOST']}/#{src}")
end
end
end
Hiya,
A rails route like '/foo/bar' will not be matched by an internal ESI request if it has a query param on the end as I believe the internally-constructed rack request isn't handling query strings correctly.
So /foo/bar works fine. /foo/bar?baz=42 doesn't inside the ESI logic but does from the outside.
Since we only use Rack::ESI in development, I've monkeypatched like this to let Rack do all the heavy lifting for us...