1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-07 17:03:01 +03:00

Disallow OAuth 2.0 use of the GraphQL API by default

This commit is contained in:
Quentin Gliech
2024-08-07 17:36:54 +02:00
parent 86fbe5c589
commit 8d00d219e1
6 changed files with 70 additions and 14 deletions

View File

@@ -201,9 +201,13 @@ pub fn build_router(
mas_config::HttpResource::Human => {
router.merge(mas_handlers::human_router::<AppState>(templates.clone()))
}
mas_config::HttpResource::GraphQL { playground } => {
router.merge(mas_handlers::graphql_router::<AppState>(*playground))
}
mas_config::HttpResource::GraphQL {
playground,
undocumented_oauth2_access,
} => router.merge(mas_handlers::graphql_router::<AppState>(
*playground,
*undocumented_oauth2_access,
)),
mas_config::HttpResource::Assets { path } => {
let static_service = ServeDir::new(path)
.append_index_html_on_directories(false)