Commit 26140f91 authored by Andrew Newdigate's avatar Andrew Newdigate Committed by Douwe Maan

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.
parent 2b9ddc2f
......@@ -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
......
---
title: Always allow access to health endpoints from localhost in dev
merge_request: 29930
author:
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment