You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/12/02 07:33:37 UTC

[GitHub] [apisix-java-plugin-runner] dev-Wang commented on issue #217: request help: how can i get custom request headers in the ext-plugin-post-resp?

dev-Wang commented on issue #217:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/217#issuecomment-1334859056

   > > PostRequest.getUpstreamHeaders()
   > 
   > Get the headers returned from the upstream
   > 
   > 1. we can get request headers in `filter` function by `ext-plugin-pre-req`
   > 2. keep request headers as internal variables
   > 3. use internal variables in `postFilter` by `ext-plugin-post-resp`
   
   Although i can get the token in the `ext-plugin-post-resp` by this way, but i can't ensure the token delivered to the  `ext-plugin-post-resp` meet my expectation. Users can send request at the same time. in this situation, how can i ensure a pair of request-response in a filter chain?
   eg: i've enabled `ext-plugin-pre-req` and `ext-plugin-post-resp`, user A and user B call a interface at the same time, `postFilter` function will be called twice. now i take two tokens, how to distinguish the token whether belongs to user A or B? i've tried to get requestId but the requestId in request is different from response.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org