DEV Community

Ortiz de Arcanjo António David
Ortiz de Arcanjo António David

Posted on

1

Middleware usando Golang

Nas aplicações Web, os middlewares são usados para aplicar lógica global a todas as solicitações, antes que elas atinjam os controllers (ou handlers).

Essas tarefas podem incluir autenticação, autorização, manipulação de cookies, logging, compressão de resposta, entre outros.

Os middlewares têm a capacidade de interceptar uma solicitação antes que ela atinja a lógica do controller, processar ou modificar a solicitação e a resposta, e então passá-las adiante na cadeia de middlewares ou enviá-las para o controller correspondente.

Código fonte: https://github.com/ortizdavid/golang-fiber-webApp

Image description

Image description

Image description

Image description

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay