Code walkthrough: Gitea middlewares

https://discourse.gitea.io/t/code-walkthrough-gitea-middlewares/4075