-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Missing changes required to make new UI work #2793
Conversation
Conflicts: dapps/Cargo.toml dapps/src/api/response.rs dapps/src/handlers/echo.rs dapps/src/lib.rs dapps/src/proxypac.rs dapps/src/router/mod.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, a couple questions and comments.
@@ -850,7 +849,7 @@ dependencies = [ | |||
[[package]] | |||
name = "jsonrpc-http-server" | |||
version = "6.1.1" | |||
source = "git+https://github.com/ethcore/jsonrpc-http-server.git#ee72e4778583daf901b5692468fc622f46abecb6" | |||
source = "git+https://github.com/ethcore/jsonrpc-http-server.git#cd6d4cb37d672cc3057aecd0692876f9e85f3ba5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reason for bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing jsonrpc_http_server::cors
stuff (was private before)
@@ -1875,7 +1852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
[[package]] | |||
name = "ws" | |||
version = "0.5.2" | |||
source = "git+https://github.com/ethcore/ws-rs.git?branch=mio-upstream-stable#609b21fdab96c8fffedec8699755ce3bea9454cb" | |||
source = "git+https://github.com/ethcore/ws-rs.git?branch=mio-upstream-stable#e3d21c119350e753fdf4475b8cd88103b2280540" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason for bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing req.method()
and adding some logic related to CONNECT
handling (still unfinished though, but decided to split it into separate PR)
|
||
let handler = endpoint.and_then(|v| match v { | ||
"apps" => Some(as_json(&self.api.list_apps())), | ||
"ping" => Some(ping_response(&self.api.local_domain)), | ||
"ping" => Some(ping_response()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming: response::ping()
?
if env::var("RUST_LOG").is_ok() { | ||
let mut builder = LogBuilder::new(); | ||
builder.parse(&env::var("RUST_LOG").unwrap()); | ||
builder.init().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_ok
-> unwrap
is better done with if let Ok(...)
.
what's the guarantee that the RUST_LOG
flags are valid? edit: well, if it's only used in test code, the unwrap is alright :)
So does this mean that the user needs to expose 8180 instead of 8080 to access from external network now? |
As in the current version, the secure apps are served via :8180, i.e. in 1.3.x it was the Signer in 1.4 is it the full built-in UI. (In both cases the apps are using the secure WS APIs). All Dapps are still served from :8080 and is only allowed to utilise the RPC APIs via :8080/rpc/ - this includes apps installed into ~/.parity/dapps as well as the built-in dapps, i.e. Gavcoin, TokenReg, Registry, Basiccoin, GithubHint & the method signature registry. In short - if the user (in the past) used the signer over the network via :8180, the same goes. Since we don't have stand-alone home & status apps, external network setup would need to cater for this config as well. If users use only our app, :8180 is enough, if they use dapps as well :8080 is also required. |
8080->8180
home.parity
tohttp://127.0.0.1:8180
/api
to allow request from signer port (if signer is enabled)One thing left:
When on
http://home.parity
connection to WS is broken (browser is sending some unhadled requests to WS-RS server, assuming it's a proxy server)