Skip to Content
C# 7 and .NET Core 2.0 High Performance
book

C# 7 and .NET Core 2.0 High Performance

by Ovais Mehboob Ahmed Khan
April 2018
Intermediate to advanced
300 pages
7h 41m
English
Packt Publishing
Content preview from C# 7 and .NET Core 2.0 High Performance

Adding the referrer-policy header

When a user navigates the site and click links to other sites, the destination site usually receives information about the origin site the user came from. The referrer header lets you control what information should be present in the header, which can be read by the destination site. We can add the referrer policy middleware in the Configure method of the Startup class as follows:

app.UseReferrerPolicy(opts => opts.NoReferrer());

The NoReferrer option means that no referrer information will be sent to the target site.

After enabling all of the preceding middleware in our ASP.NET Core application, when we scan through the securityheaders.io site, we will see that we have a security report summary with an ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional C# 7 and .NET Core 2.0, 7th Edition

Professional C# 7 and .NET Core 2.0, 7th Edition

Christian Nagel
Pro ASP.NET Web API: HTTP Web Services in ASP.NET

Pro ASP.NET Web API: HTTP Web Services in ASP.NET

Tugberk Ugurlu, Alexander Zeitler, Ali Kheyrollahi
Enterprise Application Development with C# 9 and .NET 5

Enterprise Application Development with C# 9 and .NET 5

Ravindra Akella, Rishabh Verma, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu

Publisher Resources

ISBN: 9781788470049Supplemental Content