Currently passenger 4.0.39 and above come with a default nginx configuration file with a location @static_assets
block. Paste the following inside it.
if ($request_filename ~* ^.*?/([^/]*?)$) {
set $filename $1;
}
if ($filename ~* ^.*?\.(eot)|(ttf)|(svg)|(woff)$) {
add_header Access-Control-Allow-Origin *;
}