Gab-Social/app/models/application_record.rb
Free Speech Forever 92c9092abd Avoid redundant OAuth queries when not signed in
If you aren't signed in, you don't have an auth token.
When you don't have an auth token, React was sending the headers

"Authorization: Bearer null"

This caused 5 Doorkeeper token lookups using
WHERE "oauth_access_tokens"."token" = 'null'
on the Explore page (the root of the app when not signed in).
2021-02-15 23:26:00 +00:00

11 lines
203 B
Ruby

# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
connects_to database: {
writing: :primary,
reading: :slave1
}
self.abstract_class = true
include Remotable
end