Skip to content

Commit

Permalink
add exception for upload when allow_legacy_media=false
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Volk <[email protected]>
  • Loading branch information
jevolk committed Aug 30, 2024
1 parent 2837151 commit 0068624
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/api/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,12 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
get(client::get_content_thumbnail_legacy_legacy_route),
);
} else {
router = router.route("/_matrix/media/*path", any(legacy_media_disabled));
router = router.route("/_matrix/media/v3/preview_url", any(redirect_legacy_preview));
router = router
.route("/_matrix/media/v1/*path", any(legacy_media_disabled))
.route("/_matrix/media/v3/config", any(legacy_media_disabled))
.route("/_matrix/media/v3/download/*path", any(legacy_media_disabled))
.route("/_matrix/media/v3/thumbnail/*path", any(legacy_media_disabled))
.route("/_matrix/media/v3/preview_url", any(redirect_legacy_preview));
}

router
Expand Down

0 comments on commit 0068624

Please sign in to comment.