FIX: show letter avatars even if NGINX is not running in Dev mode

This commit is contained in:
Sam
2015-11-25 14:42:46 +11:00
parent 0844350308
commit d41a8a21cc
3 changed files with 38 additions and 15 deletions

View File

@@ -314,6 +314,9 @@ Discourse::Application.routes.draw do
get "letter_avatar/:username/:size/:version.png" => "user_avatars#show_letter", format: false, constraints: { hostname: /[\w\.-]+/, size: /\d+/, username: USERNAME_ROUTE_FORMAT}
get "user_avatar/:hostname/:username/:size/:version.png" => "user_avatars#show", format: false, constraints: { hostname: /[\w\.-]+/, size: /\d+/, username: USERNAME_ROUTE_FORMAT }
# in most production settings this is bypassed
get "letter_avatar_proxy/:version/letter/:letter/:color/:size.png" => "user_avatars#show_proxy_letter"
get "highlight-js/:hostname/:version.js" => "highlight_js#show", format: false, constraints: { hostname: /[\w\.-]+/ }
get "stylesheets/:name.css" => "stylesheets#show", constraints: { name: /[a-z0-9_]+/ }