drupal-with-nginx
drupal-with-nginx copied to clipboard
Escaped URIs don't work
Seems at least with the version of ubuntu (14.04) and nginx (1.6.2) that the solution for escaped URIs doesn't work -- it escapes the entire URI including path separators, leading try files to pass off to PHP for image styles (and presumably adv agg, etc)
This fixed the issue for me -- escaping only the filename:
set_by_lua $escaped_uri 'return string.gsub(ngx.var.uri, ngx.var.request_filename, ngx.escape_uri(ngx.var.request_filename))';
thanks for this! :+1:
ran into the escaping issue too and swapped to escaping only the filename. @perusio can you merge that in?
Yes, thanks for this! Advagg didn't work properly until I used this setting.