[PR #3124] [MERGED] Exclude /metrics from LOGIN_REQUIRED #12504

Closed
opened 2025-12-29 22:21:57 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3124
Author: @larsweiler
Created: 4/30/2019
Status: Merged
Merged: 4/30/2019
Merged by: @lampwins

Base: develop-2.6Head: develop-2.6-metrics


📝 Commits (4)

  • 99f0e7b Exclude /metrics from LOGIN_REQUIRED
  • 4c5603e Fix PEP 8 errors
  • 560c8d6 More elegant path checking
  • 2a2026a Forgot the additional brackets for a tuple

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 netbox/utilities/middleware.py (+2 -2)

📄 Description

Fixes:

Regarding #3123:
With LOGIN_REQUIRED enabled, /metrics can't be accessed. This is not feasible for Prometheus. This change excludes /metrics from LOGIN_REQUIRED the same way as /api is excluded.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/3124 **Author:** [@larsweiler](https://github.com/larsweiler) **Created:** 4/30/2019 **Status:** ✅ Merged **Merged:** 4/30/2019 **Merged by:** [@lampwins](https://github.com/lampwins) **Base:** `develop-2.6` ← **Head:** `develop-2.6-metrics` --- ### 📝 Commits (4) - [`99f0e7b`](https://github.com/netbox-community/netbox/commit/99f0e7b939b4e67d605e5a3814e8c3d116095bdb) Exclude /metrics from LOGIN_REQUIRED - [`4c5603e`](https://github.com/netbox-community/netbox/commit/4c5603e6ffc45b9b69c9b5900dafcd7dd18af664) Fix PEP 8 errors - [`560c8d6`](https://github.com/netbox-community/netbox/commit/560c8d6f0112c3ebe6796c55e2e799f7cd69f922) More elegant path checking - [`2a2026a`](https://github.com/netbox-community/netbox/commit/2a2026a2cc674189ccef3c7a33b82a69887a0cde) Forgot the additional brackets for a tuple ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/utilities/middleware.py` (+2 -2) </details> ### 📄 Description ### Fixes: Regarding #3123: With `LOGIN_REQUIRED` enabled, `/metrics` can't be accessed. This is not feasible for Prometheus. This change excludes `/metrics` from `LOGIN_REQUIRED` the same way as `/api` is excluded. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:21:57 +01:00
adam closed this issue 2025-12-29 22:21:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12504