File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ pub(super) fn build_axum_routes() -> AxumRouter {
5353 "/-/static/*path" ,
5454 get_static ( super :: statics:: static_handler) ,
5555 )
56+ . route (
57+ "/opensearch.xml" ,
58+ get_static ( || async { Redirect :: permanent ( "/-/static/opensearch.xml" ) } ) ,
59+ )
5660 . route (
5761 "/sitemap.xml" ,
5862 get_internal ( super :: sitemap:: sitemapindex_handler) ,
@@ -120,13 +124,6 @@ pub(super) fn build_axum_routes() -> AxumRouter {
120124pub ( super ) fn build_routes ( ) -> Routes {
121125 let mut routes = Routes :: new ( ) ;
122126
123- // This should not need to be served from the root as we reference the inner path in links,
124- // but clients might have cached the url and need to update it.
125- routes. static_resource (
126- "/opensearch.xml" ,
127- PermanentRedirect ( "/-/static/opensearch.xml" ) ,
128- ) ;
129-
130127 routes. internal_page (
131128 "/-/rustdoc.static/:single" ,
132129 super :: rustdoc:: static_asset_handler,
You can’t perform that action at this time.
0 commit comments