Skip to content

Commit

Permalink
fix: title tag
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaMorard committed Nov 10, 2024
1 parent 63e2135 commit 30b5404
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "edgee"
version = "0.4.2"
version = "0.4.3"
authors = ["Edgee <[email protected]>"]
description = "The full-stack edge platform for your edge oriented applications"
keywords = ["Edgee"]
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion src/proxy/compute/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>", "");
title_tag = title_tag.replace("<title>", "");
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);
Expand Down

0 comments on commit 30b5404

Please sign in to comment.