You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
Move the /link/:device endpoint to /device/:device
It prevents browsers to try to autocomplete /link to /link/:device
This commit is contained in:
@@ -738,7 +738,7 @@ impl Route for DeviceCodeLink {
|
||||
}
|
||||
}
|
||||
|
||||
/// `GET|POST /link/:device_code_id`
|
||||
/// `GET|POST /device/:device_code_id`
|
||||
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct DeviceCodeConsent {
|
||||
id: Ulid,
|
||||
@@ -747,11 +747,11 @@ pub struct DeviceCodeConsent {
|
||||
impl Route for DeviceCodeConsent {
|
||||
type Query = ();
|
||||
fn route() -> &'static str {
|
||||
"/link/:device_code_id"
|
||||
"/device/:device_code_id"
|
||||
}
|
||||
|
||||
fn path(&self) -> std::borrow::Cow<'static, str> {
|
||||
format!("/link/{}", self.id).into()
|
||||
format!("/device/{}", self.id).into()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user