File tree 1 file changed +4
-7
lines changed
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 {
53
53
"/-/static/*path" ,
54
54
get_static ( super :: statics:: static_handler) ,
55
55
)
56
+ . route (
57
+ "/opensearch.xml" ,
58
+ get_static ( || async { Redirect :: permanent ( "/-/static/opensearch.xml" ) } ) ,
59
+ )
56
60
. route (
57
61
"/sitemap.xml" ,
58
62
get_internal ( super :: sitemap:: sitemapindex_handler) ,
@@ -120,13 +124,6 @@ pub(super) fn build_axum_routes() -> AxumRouter {
120
124
pub ( super ) fn build_routes ( ) -> Routes {
121
125
let mut routes = Routes :: new ( ) ;
122
126
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
-
130
127
routes. internal_page (
131
128
"/-/rustdoc.static/:single" ,
132
129
super :: rustdoc:: static_asset_handler,
You can’t perform that action at this time.
0 commit comments