This repository was archived by the owner on Jul 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Examples/Titanium.Web.Proxy.Examples.Wpf Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,12 @@ public MainWindow()
115115
116116 private async Task ProxyServer_BeforeTunnelConnectRequest ( object sender , TunnelConnectSessionEventArgs e )
117117 {
118+ string hostname = e . WebSession . Request . RequestUri . Host ;
119+ if ( hostname . EndsWith ( "webex.com" ) )
120+ {
121+ e . Excluded = true ;
122+ }
123+
118124 await Dispatcher . InvokeAsync ( ( ) =>
119125 {
120126 AddSession ( e ) ;
Original file line number Diff line number Diff line change @@ -126,18 +126,16 @@ Sample request and response event handlers
126126private IDictionary < Guid , string > requestBodyHistory
127127 = new ConcurrentDictionary <Guid , string >();
128128
129- private async Task < bool > OnBeforeTunnelConnect ( string hostname )
129+ private async Task OnBeforeTunnelConnectRequest ( object sender , TunnelConnectSessionEventArgs e )
130130{
131+ string hostname = e .WebSession .Request .RequestUri .Host ;
132+
131133 if (hostname .Contains (" dropbox.com" ))
132134 {
133135 // Exclude Https addresses you don't want to proxy
134136 // Useful for clients that use certificate pinning
135137 // for example dropbox.com
136- return await Task .FromResult (true );
137- }
138- else
139- {
140- return await Task .FromResult (false );
138+ e .Excluded = true ;
141139 }
142140}
143141
You can’t perform that action at this time.
0 commit comments