drupal-with-nginx icon indicating copy to clipboard operation
drupal-with-nginx copied to clipboard

Escaped URIs don't work

Open fearlsgroove opened this issue 9 years ago • 2 comments

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))';

fearlsgroove avatar Nov 21 '14 03:11 fearlsgroove

thanks for this! :+1:

ran into the escaping issue too and swapped to escaping only the filename. @perusio can you merge that in?

dasrecht avatar May 28 '15 20:05 dasrecht

Yes, thanks for this! Advagg didn't work properly until I used this setting.

derekjhunt avatar Jul 30 '15 21:07 derekjhunt