mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 13:42:27 +05:30
Return empty response on /api/v1/metrics endpoint if metrics are not enabled
This commit is contained in:
parent
8456f8d4cd
commit
e7f7f39ce8
@ -312,6 +312,10 @@ module Invidious::Routing
|
||||
get "/api/v1/stats", {{namespace}}::Misc, :stats
|
||||
if CONFIG.statistics_enabled
|
||||
get "/api/v1/metrics", {{namespace}}::Misc, :metrics
|
||||
else
|
||||
get "/api/v1/metrics" do |env|
|
||||
env.response.status_code = 204
|
||||
end
|
||||
end
|
||||
get "/api/v1/playlists/:plid", {{namespace}}::Misc, :get_playlist
|
||||
get "/api/v1/auth/playlists/:plid", {{namespace}}::Misc, :get_playlist
|
||||
|
Loading…
Reference in New Issue
Block a user