How to chain two nginx modules together?

142 Views Asked by At

given my setup, I need to do a redirect rule, but only if a request has NOT being authorized by the ngx_http_auth_request_module.

I've done a bit of searching, but couldn't find anything. I should be able to set a global variable depending on the result of the request authorization, then the ngx_http_rewrite_module will be able to just give the client a 200 response, but with a custom content from my choosing.

I'm serving a video player, so I cannot return any other response code but 200, otherwise the warning video will not be played back.

0

There are 0 best solutions below