In dev, always allow access to health endpoints from localhost
This change will allow developers to easily hook up a Prometheus instance to their local development instance, without making any configuration changes.
This commit is contained in:
parent
2b9ddc2f99
commit
26140f9185
|
@ -14,6 +14,10 @@ module RequiresWhitelistedMonitoringClient
|
|||
end
|
||||
|
||||
def client_ip_whitelisted?
|
||||
# Always allow developers to access http://localhost:3000/-/metrics for
|
||||
# debugging purposes
|
||||
return true if Rails.env.development? && request.local?
|
||||
|
||||
ip_whitelist.any? { |e| e.include?(Gitlab::RequestContext.client_ip) }
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Always allow access to health endpoints from localhost in dev
|
||||
merge_request: 29930
|
||||
author:
|
||||
type: other
|
Loading…
Reference in New Issue