mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-31 07:16:27 +00:00
Move if CONFIG.statistics_enabled into the handler for the /metrics route
This commit is contained in:
@@ -29,6 +29,11 @@ module Invidious::Routes::API::V1::Misc
|
||||
end
|
||||
|
||||
def self.metrics(env)
|
||||
if !CONFIG.statistics_enabled
|
||||
env.response.status_code = 204
|
||||
return
|
||||
end
|
||||
|
||||
env.response.content_type = "text/plain"
|
||||
|
||||
return String.build do |str|
|
||||
|
||||
Reference in New Issue
Block a user