# Auth\_request: is it possible to return auth\_request result directly to client?

**URL:** <https://www.ruby-forum.com/t/auth-request-is-it-possible-to-return-auth-request-result-directly-to-client/227311>\
**Category:** NGINX\
**Created:** [March 11, 2013, 10:20am UTC](https://www.ruby-forum.com/t/auth-request-is-it-possible-to-return-auth-request-result-directly-to-client/227311 "2013-03-11T10:20:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Wrobel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@Jan\_Wrobel](https://www.ruby-forum.com/u/Jan_Wrobel)\
**Post date:** [March 11, 2013, 10:20am UTC](https://www.ruby-forum.com/t/auth-request-is-it-possible-to-return-auth-request-result-directly-to-client/227311/1 "2013-03-11T10:20:51Z")

</div>

Hi,

Currently I have auth\_request module configured to return static pages  
on 401 and 403 errors. This looks like this:

auth\_request /auth/api/is-authorized/;  
error\_page 401 /auth/login.html;  
error\_page 403 /auth/not\_authorized.html;

Instead of this, is it possible to return 401 and 403 responses (along  
with bodies) from the authentication backend directly to the client?

Thanks,  
Jan

---

<div class="post-metadata">

**Author:** ![Jan\_Wrobel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@Jan\_Wrobel](https://www.ruby-forum.com/u/Jan_Wrobel)\
**Post date:** [March 11, 2013, 11:55am UTC](https://www.ruby-forum.com/t/auth-request-is-it-possible-to-return-auth-request-result-directly-to-client/227311/2 "2013-03-11T11:55:35Z")

</div>

Hello!

On Mon, Mar 11, 2013 at 10:20:10AM +0100, Jan Wrobel wrote:

> with bodies) from the authentication backend directly to the client?  
> No.

–  
Maxim D.

> **[nginx: donation](http://nginx.org/en/donation.html)**
