0d6031be
server: use routing groups
Instead of hardcoding some exceptions in the auth middleware, use a different routing group for routes that do not require auth. Makes the auth middleware more generic and also removes a lot of unneccessary middleware processing from routes that don't need it. For now, the added group is not accessible from outside the module, but if the need arises, this might be an option.
Conrad Hoffmann <ch@bitfehler.net> — 2024-09-05 21:30:29 UTC
Commit 0d6031bec59cdb9d3d9b735ce99ed5249fa5651e —
view raw patch
Parent(s):
296f02e4
| File | Status | + | − |
|---|---|---|---|
auth/middleware.go
|
M | +1 | -11 |
server/server.go
|
M | +22 | -13 |