Overview
When you configure an API on Tyk, the Gateway will proxy all requests received at the listen path that you have defined through to the upstream (target) URL configured in the API definition. Responses from the upstream are likewise proxied on to the originating client. Requests and responses are processed through a powerful chain of middleware that perform security and processing functions. Within that chain are a highly configurable set of optional middleware that can, on a per-endpint basis:- apply processing to API requests before they are proxied to the upstream service
- apply customization to the API response prior to it being proxied back to the client
Middleware applied to the API Request
The following standard middleware can optionally be applied to API requests on a per-endpoint basis.Allow list
The Allow List middleware is a feature designed to restrict access to only specific API endpoints. It rejects requests to endpoints not specifically “allowed”, returningHTTP 403 Forbidden. This enhances the security of the API by preventing unauthorized access to endpoints that are not explicitly permitted.
Enabling the allow list will cause the entire API to become blocked other than for endpoints that have this middleware enabled. This is great if you wish to have very strict access rules for your services, limiting access to specific published endpoints.
Block list
The Block List middleware is a feature designed to prevent access to specific API endpoints. Tyk Gateway rejects all requests made to endpoints with the block list enabled, returningHTTP 403 Forbidden.