Merge branch 'master' into idmanager
Conflicts: webapp/src/apps.rs webapp/src/page/mod.rs webapp/src/proxypac.rs webapp/src/router/mod.rs
This commit is contained in:
@@ -65,6 +65,8 @@ use std::collections::HashMap;
|
||||
use jsonrpc_core::{IoHandler, IoDelegate};
|
||||
use router::auth::{Authorization, NoAuth, HttpBasicAuth};
|
||||
|
||||
static DAPPS_DOMAIN : &'static str = ".parity";
|
||||
|
||||
/// Webapps HTTP+RPC server build.
|
||||
pub struct ServerBuilder {
|
||||
handler: Arc<IoHandler>,
|
||||
|
||||
@@ -21,6 +21,7 @@ mod url;
|
||||
mod redirect;
|
||||
pub mod auth;
|
||||
|
||||
use DAPPS_DOMAIN;
|
||||
use std::sync::Arc;
|
||||
use std::collections::HashMap;
|
||||
use url::Host;
|
||||
@@ -40,7 +41,7 @@ pub enum SpecialEndpoint {
|
||||
Rpc,
|
||||
Api,
|
||||
Utils,
|
||||
None
|
||||
None,
|
||||
}
|
||||
|
||||
pub struct Router<A: Authorization + 'static> {
|
||||
@@ -165,8 +166,8 @@ fn extract_endpoint(url: &Option<Url>) -> (Option<EndpointPath>, SpecialEndpoint
|
||||
|
||||
match *url {
|
||||
Some(ref url) => match url.host {
|
||||
Host::Domain(ref domain) if domain.ends_with(apps::DAPPS_DOMAIN) => {
|
||||
let len = domain.len() - apps::DAPPS_DOMAIN.len();
|
||||
Host::Domain(ref domain) if domain.ends_with(DAPPS_DOMAIN) => {
|
||||
let len = domain.len() - DAPPS_DOMAIN.len();
|
||||
let id = domain[0..len].to_owned();
|
||||
|
||||
(Some(EndpointPath {
|
||||
|
||||
Reference in New Issue
Block a user