Fix HTTP 200 response code on paths to remote accounts that don't exist (#40341)

This commit is contained in:
Eugen Rochko
2026-10-02 11:48:25 +00:00
committed by GitHub
parent 1bf178ee59
commit 73fe2b7346
5 changed files with 27 additions and 14 deletions

View File

@@ -0,0 +1,12 @@
# frozen_string_literal: true
class RemoteAccountsController < HomeController
before_action :require_resource_exists!
private
def require_resource_exists!
# The page should still render normally, but the HTTP code should be modified
response.status = 404 if permalink_redirector.object.nil?
end
end