mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 21:01:05 +00:00
Make using insecure connections opt-in (#1309)
* add insecure url checks * rename variables * add feature flags to expose Url properly * fix test compile error * fix feature errors * remove comment * add url crate and use it for url parsing * fix compile errors * satisfy the holy clippy * fix typos and host loopback * macro attribute, provide validation function in utils * fix expected output of ui tests * remove the success case for --allow-insecure because we cannot establish ws:// connection at the moment.
This commit is contained in:
+4
-4
@@ -220,7 +220,7 @@ pub mod ext {
|
||||
/// mod polkadot {}
|
||||
/// ```
|
||||
///
|
||||
/// ## `runtime_metadata_url = "..."`
|
||||
/// ## `runtime_metadata_insecure_url = "..."`
|
||||
///
|
||||
/// This attribute can be used instead of `runtime_metadata_path` and will tell the macro to download metadata from a node running
|
||||
/// at the provided URL, rather than a node running locally. This can be useful in CI, but is **not recommended** in production code,
|
||||
@@ -228,7 +228,7 @@ pub mod ext {
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// #[subxt::subxt(
|
||||
/// runtime_metadata_url = "wss://rpc.polkadot.io:443"
|
||||
/// runtime_metadata_insecure_url = "wss://rpc.polkadot.io:443"
|
||||
/// )]
|
||||
/// mod polkadot {}
|
||||
/// ```
|
||||
@@ -281,14 +281,14 @@ pub mod ext {
|
||||
///
|
||||
/// ## `unstable_metadata`
|
||||
///
|
||||
/// This attribute works only in combination with `runtime_metadata_url`. By default, the macro will fetch the latest stable
|
||||
/// This attribute works only in combination with `runtime_metadata_insecure_url`. By default, the macro will fetch the latest stable
|
||||
/// version of the metadata from the target node. This attribute makes the codegen attempt to fetch the unstable version of
|
||||
/// the metadata first. This is **not recommended** in production code, since the unstable metadata a node is providing is likely
|
||||
/// to be incompatible with Subxt.
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// #[subxt::subxt(
|
||||
/// runtime_metadata_url = "wss://rpc.polkadot.io:443",
|
||||
/// runtime_metadata_insecure_url = "wss://rpc.polkadot.io:443",
|
||||
/// unstable_metadata
|
||||
/// )]
|
||||
/// mod polkadot {}
|
||||
|
||||
Reference in New Issue
Block a user