Can finalize Matrix authentication
This commit is contained in:
@@ -55,7 +55,7 @@ async fn main() -> std::io::Result<()> {
|
||||
|
||||
let cors = Cors::default()
|
||||
.allowed_origin(&AppConfig::get().website_origin)
|
||||
.allowed_methods(vec!["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"])
|
||||
.allowed_methods(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"])
|
||||
.allowed_header(constants::API_AUTH_HEADER)
|
||||
.allow_any_header()
|
||||
.supports_credentials()
|
||||
@@ -94,6 +94,10 @@ async fn main() -> std::io::Result<()> {
|
||||
"/api/matrix_link/start_auth",
|
||||
web::post().to(matrix_link_controller::start_auth),
|
||||
)
|
||||
.route(
|
||||
"/api/matrix_link/finish_auth",
|
||||
web::post().to(matrix_link_controller::finish_auth),
|
||||
)
|
||||
})
|
||||
.workers(4)
|
||||
.bind(&AppConfig::get().listen_address)?
|
||||
|
||||
Reference in New Issue
Block a user