serverless-api-gateway-caching icon indicating copy to clipboard operation
serverless-api-gateway-caching copied to clipboard

headers caching for multi-tenant

Open fernandohonig opened this issue 9 months ago • 8 comments

Hi! We have a SaaS app and we use a custom header to define the customer-id and send that to the APIs we have. In every request, we have that customer-id header. When I enable caching, data from one customer is shown in another customer, like it's not respecting the customer-id key I set in every function.

For instance:

    events:
      - http:
          method: GET
          request:
            parameters:
              querystrings:
                module: true
          caching:
            enabled: true
            cacheKeyParameters:
              - name: request.header.customer-id
              - name: request.querystring.module

What am I doing wrong?. Thanks!

fernandohonig avatar Apr 26 '24 16:04 fernandohonig