Revert "Don't cache redirects"

This reverts commit 2778b3ac84.
This commit is contained in:
Valentin Brandl 2019-08-07 21:01:09 +02:00
parent 2778b3ac84
commit bef5f70eab
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D
2 changed files with 1 additions and 12 deletions

View File

@ -80,10 +80,6 @@ fn redirect<T: Service>(
LOCATION, LOCATION,
T::redirect_url(&data.user, &data.repo, &head, &data.file).as_str(), T::redirect_url(&data.user, &data.repo, &head, &data.file).as_str(),
) )
.set(CacheControl(vec![
CacheDirective::Public,
CacheDirective::MaxAge(0),
]))
.finish() .finish()
})); }));
} }

View File

@ -4,10 +4,7 @@ use crate::{
statics::{load_env_var, GITHUB_AUTH_QUERY, OPT}, statics::{load_env_var, GITHUB_AUTH_QUERY, OPT},
}; };
use actix_web::{ use actix_web::{
http::{ http::{header::LOCATION, StatusCode},
header::{CacheControl, CacheDirective, LOCATION},
StatusCode,
},
web, Error, HttpResponse, web, Error, HttpResponse,
}; };
use awc::{error::PayloadError, Client, ClientResponse}; use awc::{error::PayloadError, Client, ClientResponse};
@ -271,10 +268,6 @@ impl Service for GitLab {
) )
.as_str(), .as_str(),
) )
.set(CacheControl(vec![
CacheDirective::Public,
CacheDirective::MaxAge(0),
]))
.finish() .finish()
}) })
.from_err(), .from_err(),