-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Whenever I do a redirect, I get a 404 on the page redirected to, even though the url exists when I reload the exact same url. I have checked the http responses of /auth/login and the page redirected to, and they are both valid.
This is what my handler looks like at the moment.
impl AuthenticationController {
// Route: POST /auth/login
pub fn login(req: &mut Request) -> IronResult<Response> {
let url: Url;
if try!(req.session().get::<middleware::sessions::Login>()).is_some() {
url = url_for!(req, "index", "status" => "already_loggedin");
} else {
if User::authenticate("hello@nickforall.nl", "password") {
url = url_for!(req, "index", "status" => "success");
} else {
url = url_for!(req, "index", "status" => "failure");
}
}
Ok(Response::with((status::Found, Redirect(url.clone()))))
}
}Metadata
Metadata
Assignees
Labels
No labels