CacheControl private
This commit is contained in:
parent
bef5f70eab
commit
733c6135da
@ -80,6 +80,7 @@ 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::Private]))
|
||||||
.finish()
|
.finish()
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,10 @@ 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::{header::LOCATION, StatusCode},
|
http::{
|
||||||
|
header::{CacheControl, CacheDirective, LOCATION},
|
||||||
|
StatusCode,
|
||||||
|
},
|
||||||
web, Error, HttpResponse,
|
web, Error, HttpResponse,
|
||||||
};
|
};
|
||||||
use awc::{error::PayloadError, Client, ClientResponse};
|
use awc::{error::PayloadError, Client, ClientResponse};
|
||||||
@ -268,6 +271,7 @@ impl Service for GitLab {
|
|||||||
)
|
)
|
||||||
.as_str(),
|
.as_str(),
|
||||||
)
|
)
|
||||||
|
.set(CacheControl(vec![CacheDirective::Private]))
|
||||||
.finish()
|
.finish()
|
||||||
})
|
})
|
||||||
.from_err(),
|
.from_err(),
|
||||||
|
Loading…
Reference in New Issue
Block a user