Commit 374574c6 authored by justcoding121's avatar justcoding121

update example

parent 9152f131
...@@ -195,7 +195,7 @@ namespace Titanium.Web.Proxy.Examples.Basic ...@@ -195,7 +195,7 @@ namespace Titanium.Web.Proxy.Examples.Basic
////Redirect example ////Redirect example
//if (e.WebSession.Request.RequestUri.AbsoluteUri.Contains("wikipedia.org")) //if (e.WebSession.Request.RequestUri.AbsoluteUri.Contains("wikipedia.org"))
//{ //{
// await e.Redirect("https://www.paypal.com"); // e.Redirect("https://www.paypal.com");
//} //}
} }
......
...@@ -152,7 +152,7 @@ public async Task OnRequest(object sender, SessionEventArgs e) ...@@ -152,7 +152,7 @@ public async Task OnRequest(object sender, SessionEventArgs e)
//Filter URL //Filter URL
if (e.WebSession.Request.RequestUri.AbsoluteUri.Contains("google.com")) if (e.WebSession.Request.RequestUri.AbsoluteUri.Contains("google.com"))
{ {
e.Ok("<!DOCTYPE html>" + e.Ok("<!DOCTYPE html>" +
"<html><body><h1>" + "<html><body><h1>" +
"Website Blocked" + "Website Blocked" +
"</h1>" + "</h1>" +
...@@ -163,7 +163,7 @@ public async Task OnRequest(object sender, SessionEventArgs e) ...@@ -163,7 +163,7 @@ public async Task OnRequest(object sender, SessionEventArgs e)
//Redirect example //Redirect example
if (e.WebSession.Request.RequestUri.AbsoluteUri.Contains("wikipedia.org")) if (e.WebSession.Request.RequestUri.AbsoluteUri.Contains("wikipedia.org"))
{ {
e.Redirect("https://www.paypal.com"); e.Redirect("https://www.paypal.com");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment