Gorilla Mux Router : Enforce auth is enabled by default for all routes

Viewed 41

Is there a way to enforce that Authentication is enabled by default in Gorilla mux router. The intent is to make sure a dev, while adding a new API, does not forget to add auth.

We can always write a wrapper function (over router.Handle()) and ask devs to create new routes using that, but is there a better/cleaner way ?

0 Answers
Related