fix: restrict /metrics endpoint to admin users in production#95
fix: restrict /metrics endpoint to admin users in production#95Deepam02 wants to merge 2 commits intomcpjungle:mainfrom
Conversation
|
Removed the extra middleware. |
|
Thanks. I just realized that there's another complication - this authentication works well when an admin is trying to access /metrics because they send their admin token. |
|
Yes! i see this issue The best solution would be adding an auth token for prometheus authentication, but that might be outside my scope for now - seems too complex for a beginner. |
|
I'll keep this open because its a valid change but needs to be refined further. |
e6f9f3d to
321f552
Compare
Fixes #92
Added
requireAdminUser()middleware to/metricsendpoint as requested in the issue.