Skip to content

Commit

Permalink
change static-domain config to static-root-path
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Oct 15, 2022
1 parent ae0a5a9 commit 564f022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct Config {

// CloudFront domain which we can access
// public S3 files through
pub(crate) s3_static_domain: String,
pub(crate) s3_static_root_path: String,

// Github authentication
pub(crate) github_accesstoken: Option<String>,
Expand Down Expand Up @@ -131,7 +131,7 @@ impl Config {
#[cfg(test)]
s3_bucket_is_temporary: false,

s3_static_domain: env("S3_STATIC_DOMAIN", "https://static.docs.rs".to_string())?,
s3_static_root_path: env("S3_STATIC_ROOT_PATH", "https://static.docs.rs".to_string())?,

github_accesstoken: maybe_env("DOCSRS_GITHUB_ACCESSTOKEN")?,
github_updater_min_rate_limit: env("DOCSRS_GITHUB_UPDATER_MIN_RATE_LIMIT", 2500)?,
Expand Down
2 changes: 1 addition & 1 deletion src/web/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ pub fn download_handler(req: &mut Request) -> IronResult<Response> {

Ok(super::redirect(ctry!(
req,
Url::parse(&format!("{}/{}", config.s3_static_domain, archive_path))
Url::parse(&format!("{}/{}", config.s3_static_root_path, archive_path))
)))
}

Expand Down

0 comments on commit 564f022

Please sign in to comment.