-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In order to set the headers of the upstream request, I use ngx.req.set_header
in rewrite_by_lua_block
, but my upstream endpoint cannot receive such header.
#2282
Comments
ngx.req.set_header
in rewrite_by_lua_block
, but my upstream endpoint cannot receive such header. here is my conf.ngx.req.set_header
in rewrite_by_lua_block
, but my upstream endpoint cannot receive such header. here is my conf.
ngx.req.set_header
in rewrite_by_lua_block
, but my upstream endpoint cannot receive such header. here is my conf.ngx.req.set_header
in rewrite_by_lua_block
, but my upstream endpoint cannot receive such header.
I don't know if proxy_pass_header helps. |
It works,but I want to set the header dynamically in lua code. |
You should do something like this:
|
The request header to be set is obtained dynamically through Lua and cannot be hard-coded with proxy_set_header. |
The connection header will be specially processed by nginx proxy (the default header value is "close"). You must use proxy_set_header to set the value of the connection header. You can use Lua to set other headers normally. |
Have you solved this problem?I have a similar problem,
Originally posted by @djfsb in #437 (comment)
The text was updated successfully, but these errors were encountered: