Splitting RPC Apis into more fine-grained sets (#1234)
This commit is contained in:
@@ -77,7 +77,7 @@ impl ws::Handler for Session {
|
||||
// Check request origin and host header.
|
||||
if !origin_is_allowed(&self.self_origin, origin) && !origin_is_allowed(&self.self_origin, host) {
|
||||
warn!(target: "signer", "Blocked connection to Signer API from untrusted origin.");
|
||||
return Ok(ws::Response::forbidden("You are not allowed to access system ui.".into()));
|
||||
return Ok(ws::Response::forbidden(format!("You are not allowed to access system ui. Use: http://{}", self.self_origin)));
|
||||
}
|
||||
|
||||
// Detect if it's a websocket request.
|
||||
@@ -108,7 +108,7 @@ impl ws::Handler for Session {
|
||||
let mut res = ws::Response::ok(f.content.into());
|
||||
{
|
||||
let mut headers = res.headers_mut();
|
||||
headers.push(("Server".into(), b"Parity/SystemUI".to_vec()));
|
||||
headers.push(("Server".into(), b"Parity/SignerUI".to_vec()));
|
||||
headers.push(("Connection".into(), b"Closed".to_vec()));
|
||||
headers.push(("Content-Length".into(), content_len.as_bytes().to_vec()));
|
||||
headers.push(("Content-Type".into(), f.mime.as_bytes().to_vec()));
|
||||
|
||||
Reference in New Issue
Block a user