Skip to content

Commit

Permalink
expose CorsOrigin struct
Browse files Browse the repository at this point in the history
  • Loading branch information
dkijania committed Nov 19, 2020
1 parent 6e8c38e commit 73ab500
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jormungandr-lib/src/interfaces/config/mod.rs
Expand Up @@ -6,7 +6,7 @@ mod secret;
pub use log::{Log, LogEntry, LogOutput};
pub use mempool::{LogMaxEntries, Mempool, PoolMaxEntries};
pub use node::{
Cors, Explorer, LayersConfig, NodeConfig, P2p, Policy, PreferredListConfig, Rest, Tls,
Cors, CorsOrigin, Explorer, LayersConfig, NodeConfig, P2p, Policy, PreferredListConfig, Rest, Tls,
TopicsOfInterest, TrustedPeer,
};
pub use secret::{Bft, GenesisPraos, NodeSecret};
7 changes: 7 additions & 0 deletions jormungandr-lib/src/interfaces/config/node.rs
Expand Up @@ -86,6 +86,13 @@ impl AsRef<str> for CorsOrigin {
}
}

impl From<String> for CorsOrigin {
fn from(from_str: String) -> Self {
Self(from_str)
}
}


#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct P2p {
/// The public address to which other peers may connect to
Expand Down

0 comments on commit 73ab500

Please sign in to comment.