diff --git a/backend/src/main.rs b/backend/src/main.rs index 20bd518..7eb5b3a 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -80,6 +80,7 @@ fn redirect( LOCATION, T::redirect_url(&data.user, &data.repo, &head, &data.file).as_str(), ) + .set(CacheControl(vec![CacheDirective::Private])) .finish() })); } diff --git a/backend/src/service.rs b/backend/src/service.rs index 4f1e924..82a57da 100644 --- a/backend/src/service.rs +++ b/backend/src/service.rs @@ -4,7 +4,10 @@ use crate::{ statics::{load_env_var, GITHUB_AUTH_QUERY, OPT}, }; use actix_web::{ - http::{header::LOCATION, StatusCode}, + http::{ + header::{CacheControl, CacheDirective, LOCATION}, + StatusCode, + }, web, Error, HttpResponse, }; use awc::{error::PayloadError, Client, ClientResponse}; @@ -268,6 +271,7 @@ impl Service for GitLab { ) .as_str(), ) + .set(CacheControl(vec![CacheDirective::Private])) .finish() }) .from_err(),