silveric10 commented on issue #4271: URL: https://github.com/apache/apisix/issues/4271#issuecomment-843794735
> You need to make sure that the execution priority of plugin A that sets the request header is greater than plugin B. How to set the request header, you can parameter proxy-rewrite plugin: https://github.com/apache/apisix/blob/master/apisix/plugins/proxy-rewrite.lua#L197 Thanks. I'm sure that plugin A's priority is greater than plugin B's priority. I think the reason is I called core.request.header(ctx, ...) at the begining of plugin A, and set new header before plugin A return. The function core.request.header() only be update when it's first call, I think here is the code: ``` local headers = ctx.headers if not headers then headers = get_headers() ctx.headers = headers end ``` -- 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. For queries about this service, please contact Infrastructure at: [email protected]
