Hi David,
Thanks for the reply, indeed x-accel-redirect seems to create some complications. My current workflow is:
I guess I could do
However I am strugglying in using ngx.location.capture to mimic a proxy_pass directive, i.e. subrequest to the backen with the same method, header and body as the client request.
Could you help me out with that ?
Thank you in advance !
Moritz
On Wednesday, October 3, 2018 at 8:28:54 PM UTC, David Birdsong wrote:
I'm not sure how to instrument this, but as a user of X-Accel-Redirect for ~10 years in various projects and companies, I'd advise against using it if you can. It's often not worth the hassle it creates. If possible, use subrequests or use the lua http libraries available from the community.
- implemented as a rewrite under the hood
- because of that, you lose ctx
- all the hassles that stem from those two points...
Hi !
I've been playing around with X-Accel-Redirect and was wondering if there is a mean to execute some instructions just before Nginx performs the redirect requested by the backend ?
I would like to be able to do: 1. Backend returns x-accel-redirect header, 2. Check upstream response, 3. Nginx redirects to X-Accel-Redirect defined internal location.
Thanks in advance!
Moritz
.