Skip to content

Commit

Permalink
Added ignore path to example app
Browse files Browse the repository at this point in the history
  • Loading branch information
andersjanmyr committed Jun 20, 2022
1 parent e9f641c commit d9cd1e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions esi_example_app/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>My Shopping Website</h1>
<esi:include src="https://mock-s3.edgecompute.app/_fragments/content.html"/>
<esi:include src="https://mock-s3.edgecompute.app/_fragments/doesnotexist.html" alt="https://mock-s3.edgecompute.app/_fragments/content.html"/>
<esi:include src="https://mock-s3.edgecompute.app/_fragments/doesnotexist.html" onerror="continue"/>
<esi:include src="https://mock-s3.edgecompute.app/ignore">this should be here, since it's ingored</esi:include>
</div>
</body>
</html>
4 changes: 3 additions & 1 deletion esi_example_app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ fn handle_request(req: Request) -> Result<(), Error> {
.map(|c| c.subtype() == mime::HTML)
.unwrap_or(false)
{
let config = esi::Configuration::default().with_recursion();
let config = esi::Configuration::default()
.with_recursion()
.with_matcher(&|src| !src.contains("ignore"));

let processor = Processor::new(config);

Expand Down

0 comments on commit d9cd1e5

Please sign in to comment.