Comment 4 for bug 1776928

Revision history for this message
melanie witt (melwitt) wrote :

Looks like this is the code we have that does the redirect from /v2.1 => /v2.1/ [1]:

ROUTE_LIST = (
    # NOTE: This is a redirection from '' to '/'. The request to the '/v2.1'
    # or '/2.0' without the ending '/' will get a response with status code
    # '302' returned.
    ('', '/'),

I'll ask Alex if he can take a look at this and let us know if there's a way we can redirect to a relative URL. The routes docs [2] mention that variables like "{url}" can be used in redirect call arguments, so I wonder if we can leverage that somehow.

[1] https://github.com/openstack/nova/blob/187f80a/nova/api/openstack/compute/routes.py#L399-L402
[2] http://routes.readthedocs.io/en/latest/uni_redirect_rest.html#redirect-routes