(request, response, next)
| 5 | |
| 6 | // https://github.com/filipedeschamps/tabnews.com.br/blob/53482fa8d15c273e9dcda80242eaba4d9f37c9a9/middleware.public.js#L13 |
| 7 | export default function firewall(request, response, next) { |
| 8 | if (isProduction && !isRequestFromCloudflare(request)) { |
| 9 | throw new UnauthorizedError({ |
| 10 | message: |
| 11 | 'Host não autorizado. Por favor, acesse https://brasilapi.com.br', |
| 12 | }); |
| 13 | } |
| 14 | |
| 15 | return next(); |
| 16 | } |
nothing calls this directly
no test coverage detected