ruby on rails - UTF8 urls doesn't work in nginx+passenger -


i'm trying working utf8 routes in rails 4

get '/документы', to: 'static_pages#docs', as: :docs 

its working great on webrick, doesn't work in battlefield (nginx+passenger)

i guess because nginx makes url lowercase

no route matches [get] "/%d0%b4%d0%be%d0%ba%d1%83%d0%bc%d0%b5%d0%bd%d1%82%d1%8b" 

but rails expects uppercase

started "/%d0%b4%d0%be%d0%ba%d1%83%d0%bc%d0%b5%d0%bd%d1%82%d1%8b" 127.0.0.1 completed 200 ok in 52ms (views: 49.0ms | activerecord: 1.0ms) 

is there way make nginx understand unicode routes?

heres nginx server config

server {    listen 80;    server_name website.com;     charset utf8;     root /web/website/public;     location ~ ^/assets/ {       root /web/website/public;       expires 1y;       add_header cache-control public;#       add_header etag "";       break;    }     error_page  502 404 /502.html;     passenger_enabled on;    rails_spawn_method smart;    rails_env production;  } 


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -