Plugin for managing environment variables and tracking system performance #7289
Replies: 4 comments 1 reply
-
|
I haven't looked in details over the code but I'd recommend to check the builtin middlewares - https://pocketbase.io/docs/go-routing/#builtin-middlewares. The superuser condition in the handler is not exactly correct because someone can still send a non-empty Authorization header but to not be a valid token which in this case will cause |
Beta Was this translation helpful? Give feedback.
-
|
Good catch, thanks for pointing that out. Will fix it. 👍
Congrats on the funding and looking forward to the UI rewrite. Have the
repo cloned and going to play around with it soon.
…On Thu, Oct 30, 2025, 5:41 PM Gani Georgiev ***@***.***> wrote:
I haven't looked in details over the code but I'd recommend to check the
builtin middlewares -
https://pocketbase.io/docs/go-routing/#builtin-middlewares.
The superuser condition
<https://github.com/lsherman98/pbenv/blob/main/pb_hooks/routes/env_handler.go#L33>
in the handler is not exactly correct because someone can still send a
non-empty Authorization header but to not be a valid token which in this
case will cause e.Auth to be nil and it will panic. You can replace
directly the header retrieval with just if !e.HasSuperuserAuth() OR maybe
better attach the superuser middleware to your routes/groups with something
like: e.Router.Group("/_/env").Bind(apis.RequireSuperuserAuth()) and
remove the if from your handlers entirely.
—
Reply to this email directly, view it on GitHub
<#7289 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5F5FUKDLBJDJI2JPAQORAL32KAW5AVCNFSM6AAAAACKWO5CD2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIOBTGE3TGNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Now with support for tracking network traffic
|
Beta Was this translation helpful? Give feedback.
-
|
Cool!
Afaik this is not possible unless you fork the complete pocketbase repo and modify the admin UI! Thanks for the shoutout 🥰 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Inspired by some of the other great pocketbase plugins that have been shared, I decided to throw together one of my own.
The purpose is to help with managing env variables on your vps directly from the pocketbase dashboard without having to login in to your server directly. There is also a system profiler. It tracks some basic metrics and stores the data in the database so you can track your apps performance over time.
The github repo can be found here with instructions and an example project you can run - pbenv
Due to the fact that I am using Go templates for the UI I wasn't able to find a good way to add links to the new pages from the main dashboard so if anyone has any ideas please share below. The views need to be rewritten but will probably wait for the pocketbase UI rewrite to do that.
Credit to the plugins linked below for the inspiration:
Beta Was this translation helpful? Give feedback.
All reactions