token-as-var
This commit is contained in:
parent
8f236ab0dd
commit
ad26023029
|
@ -32,7 +32,10 @@ async fn connect_handler(
|
||||||
Some(val) => val.to_str().unwrap_or("").split(" ").last().unwrap_or(""),
|
Some(val) => val.to_str().unwrap_or("").split(" ").last().unwrap_or(""),
|
||||||
None => match req.match_info().get("token") {
|
None => match req.match_info().get("token") {
|
||||||
Some(val) => val,
|
Some(val) => val,
|
||||||
None => return Err(ErrorUnauthorized("Unauthorized")),
|
None => match req.query_string().split('=').last() {
|
||||||
|
Some(val) => val,
|
||||||
|
None => return Err(ErrorUnauthorized("Unauthorized")),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user