Thank you very much. However, is there a better way to mark certain API as public instead of doing that prefix "/auth" thing? Just like in NestJS there's this @public decorator for public endpoints
@@LynxIo-wr4ul better is subjective, but you can do the same thing in Go by applying middleware individually to each handler. Either way works. Since I don’t have complex routing, I’m happy with just using the prefix. The middleware in this video is effectively a decorator (function that wraps another function).
Thanks
Thank you very much. However, is there a better way to mark certain API as public instead of doing that prefix "/auth" thing?
Just like in NestJS there's this @public decorator for public endpoints
@@LynxIo-wr4ul better is subjective, but you can do the same thing in Go by applying middleware individually to each handler. Either way works. Since I don’t have complex routing, I’m happy with just using the prefix.
The middleware in this video is effectively a decorator (function that wraps another function).