Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ class ApplicationController < ActionController::Base

etag { "v1" }
stale_when_importmap_changes
allow_browser versions: :modern
end
2 changes: 2 additions & 0 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class SessionsController < ApplicationController
allow_browser versions: :modern
Copy link
Contributor

@monorkin monorkin Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the right approach.
People can also transfer their sessions or join through a join code which would skip this controller.

allow_browser should already allow bots through - https://github.com/rails/rails/blob/8aebd0b50738ed8709ae80ef5aa839824a8f2b13/actionpack/lib/action_controller/metal/allow_browser.rb#L98

This might be a bug in UserAgent, or maybe Google changed their bots?
Or maybe Cloudflare blocks the bot?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserAgent does not consider the image proxy to be a bot. It's bot check is very rudimentary and the maintainer has resisted expanding it in the couple of PRs I looked at.

Cloudflare is not blocking the bot, I pasted a screenshot of the 406 in one of the cards.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put this branch in staging last night and now avatars are working as expected in emails from staging.


# FIXME: Remove this before launch!
unless Rails.env.local?
http_basic_authenticate_with \
Expand Down