Any WSGI middleware to make HTTP redirect on specific status code?

Posted by Evgenyt on Stack Overflow See other posts from Stack Overflow or by Evgenyt
Published on 2010-04-16T16:03:10Z Indexed on 2010/04/16 17:33 UTC
Read the original article Hit count: 201

Filed under:
|
|

I'm using Pylons and want to add some middleware to it so that it catches 401 status codes and makes HTTP Redirect (302) to Signin page.

I know there is built-in StatusCodeRedirect in Pylons that acts in a similar fashion, but it does not produce HTTP redirect, and rather redirects internally (this is what I do not want).

Is there any existing middleware to add, or any generic middleware that can be easily modified to make HTTP redirects on specific status codes?

© Stack Overflow or respective owner

Related posts about pylons

Related posts about wsgi