Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
abhaymenon authored Mar 2, 2022
1 parent 1e8f431 commit c596e6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ In your .Net Core ASP project locate the startup.cs file. In the ConfigureServic
});
});
... Copy above this line ...
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddMvc(options => options.EnableEndpointRouting = false).SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}

Note: The location of the config file can be set when the proxy config service is injected. Example: ("/MyFolder/proxy.config.json")
Expand All @@ -86,7 +86,7 @@ Next add the following to the Configure method.
public void Configure(IApplicationBuilder app, IHostingEnvironment env) {
... Copy below this line ...
app.UseWhen(context => {
return context.Request.Path.Value.ToLower().StartsWith(@"/proxy/proxy.ashx", StringComparison.OrdinalIgnoreCase);
return context.Request.Path.Value.ToLower().StartsWith(@"/proxy.ashx", StringComparison.OrdinalIgnoreCase);
//&& context.User.Identity.IsAuthenticated; // Add this back in to keep unauthenticated users from utilzing the proxy.
},
builder =>
Expand Down

0 comments on commit c596e6e

Please sign in to comment.