Skip to content

feat: Add white list support to Casbin middleware

Choose a tag to compare

@atlas-u atlas-u released this 22 Oct 05:40
· 10 commits to main since this release
  • Introduced a new WithWhiteList option to allow bypassing Casbin checks for specified API routes.
  • Modified Server middleware to check if the current request path is in the white list before performing Casbin authorization.
  • Updated options struct to include a whiteList field, which holds a map of paths to be excluded from Casbin enforcement.
  • Refactored the Server function to skip Casbin checks for white-listed routes, improving flexibility for open or less restricted endpoints.