go-ozzo / ozzo-routing

An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.
MIT License
455 stars 51 forks source link

Bypass handler #58

Closed kolkov closed 4 years ago

kolkov commented 4 years ago

Hi! Is a way to bypass handler in server func? I try to find way to bypass auth handler for public routes. Or the best way to have diferent routes for private and public?

qiangxue commented 4 years ago

You should use route groups. One route group for public routes, the other installed with auth middleware for private routes.

kolkov commented 4 years ago

Thanks! Now I understand that there is no other option for skipping one of the handlers.