Skip to content

Commit 9797746

Browse files
Nemo157Joshua Nelson
authored andcommitted
Pass platform paths through a separate redirect handler
1 parent c3830a0 commit 9797746

File tree

4 files changed

+218
-186
lines changed

4 files changed

+218
-186
lines changed

src/web/crate_details.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct CrateDetails {
4242
github_issues: Option<i32>,
4343
pub(crate) metadata: MetaData,
4444
is_library: bool,
45-
pub(crate) doc_targets: Option<Json>,
45+
doc_targets: Option<Json>,
4646
license: Option<String>,
4747
documentation_url: Option<String>,
4848
}

src/web/routes.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ pub(super) fn build_routes() -> Routes {
8787
"/crate/:name/:version/source/*",
8888
super::source::source_browser_handler,
8989
);
90+
routes.internal_page(
91+
"/crate/:name/:version/target-redirect/*",
92+
super::rustdoc::target_redirect_handler,
93+
);
9094

9195
routes.rustdoc_page("/:crate", super::rustdoc::rustdoc_redirector_handler);
9296
routes.rustdoc_page("/:crate/", super::rustdoc::rustdoc_redirector_handler);

0 commit comments

Comments
 (0)