Skip to content

Commit 5cf39ca

Browse files
committed
change static-domain config to static-root-path
1 parent 7f2074f commit 5cf39ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct Config {
2828

2929
// CloudFront domain which we can access
3030
// public S3 files through
31-
pub(crate) s3_static_domain: String,
31+
pub(crate) s3_static_root_path: String,
3232

3333
// Github authentication
3434
pub(crate) github_accesstoken: Option<String>,
@@ -131,7 +131,7 @@ impl Config {
131131
#[cfg(test)]
132132
s3_bucket_is_temporary: false,
133133

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

136136
github_accesstoken: maybe_env("DOCSRS_GITHUB_ACCESSTOKEN")?,
137137
github_updater_min_rate_limit: env("DOCSRS_GITHUB_UPDATER_MIN_RATE_LIMIT", 2500)?,

src/web/rustdoc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ pub fn download_handler(req: &mut Request) -> IronResult<Response> {
761761

762762
Ok(super::redirect(ctry!(
763763
req,
764-
Url::parse(&format!("{}/{}", config.s3_static_domain, archive_path))
764+
Url::parse(&format!("{}/{}", config.s3_static_root_path, archive_path))
765765
)))
766766
}
767767

0 commit comments

Comments
 (0)