bingo: serve real favicon files
The favicon was an emoji in a data: URI and /favicon.ico was a 404. Google only shows a site icon in results when the favicon has a crawlable URL, and the emoji looked different on every platform. Add an SVG (a 5x5 card with a crossed-out diagonal), a 16/32/48 ICO and a 180px apple-touch-icon under assets/bingo/, served by explicit routes because public/ belongs to asxp.io. Assisted-by: Claude:opus-5
This commit is contained in:
parent
d2d6ac1d99
commit
cb2eba1a26
6 changed files with 25 additions and 1 deletions
|
|
@ -190,6 +190,17 @@ class BingoTest < Minitest::Test
|
|||
assert_equal 'http://example.org/en?view=operational', last_response.location
|
||||
end
|
||||
|
||||
def test_icons
|
||||
{ '/favicon.svg' => 'image/svg+xml', '/favicon.ico' => 'image/x-icon',
|
||||
'/apple-touch-icon.png' => 'image/png' }.each do |path, type|
|
||||
get path
|
||||
assert last_response.ok?, path
|
||||
assert_equal type, last_response.content_type
|
||||
end
|
||||
get '/en'
|
||||
assert_includes last_response.body, '<link rel="icon" href="/favicon.svg" type="image/svg+xml">'
|
||||
end
|
||||
|
||||
def test_root_varies_on_language
|
||||
get '/'
|
||||
assert_equal 'Accept-Language', last_response.headers['Vary']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue