From 30b540442258024bfa935c398487334d007f523c Mon Sep 17 00:00:00 2001 From: Sacha Morard <2254275+SachaMorard@users.noreply.github.com> Date: Sun, 10 Nov 2024 20:52:24 +0100 Subject: [PATCH] fix: title tag --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- README.md | 9 +++++++++ src/proxy/compute/html.rs | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a64d2c..fca1065 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -910,7 +910,7 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "edgee" -version = "0.4.2" +version = "0.4.3" dependencies = [ "addr", "aes", @@ -3720,7 +3720,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e7f45e1..46b6283 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "edgee" -version = "0.4.2" +version = "0.4.3" authors = ["Edgee "] description = "The full-stack edge platform for your edge oriented applications" keywords = ["Edgee"] diff --git a/README.md b/README.md index 1ffe659..eef1c08 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,7 @@ The Edgee proxy is designed for performance and extensibility, so you can easily - [Amplitude](https://github.com/edgee-cloud/amplitude-component) - [Google Analytics](https://github.com/edgee-cloud/ga-component) - [Segment](https://github.com/edgee-cloud/segment-component) +- [Piano Analytics](https://github.com/edgee-cloud/piano-analytics-component) You just need point to the WebAssembly implementation in your proxy configuration. You may also build your own components for integrations we don't provide yet. @@ -193,6 +194,14 @@ component = "/var/edgee/wasm/amplitude.wasm" credentials.amplitude_api_key = "YOUR-API-KEY" ``` +### Debugging a component + +You can enable debug logs for a specific component by setting the `debug` flag to `true`: + +```bash +./edgee --debug-component amplitude +``` + ## Contributing If you're interested in contributing to Edgee, read our [contribution guidelines](./CONTRIBUTING.md) diff --git a/src/proxy/compute/html.rs b/src/proxy/compute/html.rs index f01dfbf..31b46a2 100644 --- a/src/proxy/compute/html.rs +++ b/src/proxy/compute/html.rs @@ -151,7 +151,10 @@ pub(crate) fn parse_html(html: &str) -> Document { } } // get only what is between the tags - results.title = temp.chars().skip(7).take(temp.len() - 15).collect(); + let mut title_tag = temp.clone(); + title_tag = title_tag.replace("", ""); + title_tag = title_tag.replace("", ""); + results.title = title_tag; } else if temp.contains(r#"rel="canonical""#) { // get only what is in the href attribute let href = extract_href_value(&temp);