make zeitwerk happy
This commit is contained in:
parent
e76d356fdc
commit
8f5fd85f15
@ -41,7 +41,7 @@ module Websites
|
|||||||
config.good_job.enable_cron = true
|
config.good_job.enable_cron = true
|
||||||
|
|
||||||
config.middleware.insert_before(0, Middleware::DevHost) if Rails.env.development?
|
config.middleware.insert_before(0, Middleware::DevHost) if Rails.env.development?
|
||||||
config.middleware.insert_before(Rails::Rack::Logger, SilenceGoodJobLogging)
|
config.middleware.insert_before(Rails::Rack::Logger, Middleware::SilenceGoodJobLogging)
|
||||||
config.middleware.insert_before(ActionDispatch::Static, Middleware::CustomStatic, {
|
config.middleware.insert_before(ActionDispatch::Static, Middleware::CustomStatic, {
|
||||||
/^i\.furry\.cool/ => "/furry.cool/images",
|
/^i\.furry\.cool/ => "/furry.cool/images",
|
||||||
/^i\.maid\.gay/ => "/maid.gay/images",
|
/^i\.maid\.gay/ => "/maid.gay/images",
|
||||||
|
@ -83,4 +83,3 @@ production:
|
|||||||
<<: *default
|
<<: *default
|
||||||
database: websites
|
database: websites
|
||||||
password: <%= ENV["WEBSITES_DATABASE_PASSWORD"] %>
|
password: <%= ENV["WEBSITES_DATABASE_PASSWORD"] %>
|
||||||
pool: <%= ENV.fetch("WEBSITES_DATABASE_POOL") { 10 } %>
|
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class SilenceGoodJobLogging
|
module Middleware
|
||||||
def initialize(app)
|
class SilenceGoodJobLogging
|
||||||
@app = app
|
def initialize(app)
|
||||||
end
|
@app = app
|
||||||
|
end
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
request = Rack::Request.new(env)
|
request = Rack::Request.new(env)
|
||||||
host = request.env["websites.dev_host"].presence || request.host
|
host = request.env["websites.dev_host"].presence || request.host
|
||||||
if host == OtherRoutes::ADMIN_DOMAIN && env["PATH_INFO"].start_with?("/jobs")
|
if host == OtherRoutes::ADMIN_DOMAIN && env["PATH_INFO"].start_with?("/jobs")
|
||||||
Rails.logger.silence do
|
Rails.logger.silence do
|
||||||
|
@app.call(env)
|
||||||
|
end
|
||||||
|
else
|
||||||
@app.call(env)
|
@app.call(env)
|
||||||
end
|
end
|
||||||
else
|
|
||||||
@app.call(env)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user