提交 26140f91 编写于 作者: A Andrew Newdigate 提交者: 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.
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册