From d9cd1e5933144399101d6a17a2e82c0aa5afc5ce Mon Sep 17 00:00:00 2001 From: Anders Janmyr Date: Sun, 19 Jun 2022 20:53:46 +0200 Subject: [PATCH] Added ignore path to example app --- esi_example_app/src/index.html | 1 + esi_example_app/src/main.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/esi_example_app/src/index.html b/esi_example_app/src/index.html index e016f59..5567ffe 100644 --- a/esi_example_app/src/index.html +++ b/esi_example_app/src/index.html @@ -12,6 +12,7 @@

My Shopping Website

+ this should be here, since it's ingored diff --git a/esi_example_app/src/main.rs b/esi_example_app/src/main.rs index a038da9..54ed037 100644 --- a/esi_example_app/src/main.rs +++ b/esi_example_app/src/main.rs @@ -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);