In my falcon app I want to redirect to another page from the authenticate function.
I am doing this:
resp.status = falcon.HTTP_301
resp.set_header('Location', '/http://foo.bar.com:8004/falcon_passthrough/')
But it still calls the underlying endpoint on return and does not redirect.
Is there a way to cause this redirect and not call the underlying endpoint?
If you are using 1.0.0rc1
just do:
raise falcon.HTTPMovedPermanently(location)