Delivering proper PNG 404 images for thumbnails and large images

This commit is contained in:
Christoph Haas 2016-06-27 17:38:24 +02:00
parent d6bfba2e83
commit 205c624778
4 changed files with 40 additions and 4 deletions

View file

@ -28,6 +28,8 @@ Debshots::Application.routes.draw do
get 'about' => 'welcome#about'
get 'thumbnail/:name' => 'packages#thumbnail', as: :thumbnail_image, name: /[^\/]+/
get 'thumbnail-with-version/:name/:version' => 'packages#thumbnail', name: /[^\/]+/, version: /\S+/
get 'screenshot/:name' => 'packages#screenshot', as: :screenshot_image, name: /[^\/]+/
get 'screenshot-with-version/:name/:version' => 'packages#screenshot', name: /[^\/]+/, version: /\S+/
# Legacy URLs
get 'with_screenshots', to: redirect('/packages?show=with')