Skip to content

Instantly share code, notes, and snippets.

View VijayBhatter's full-sized avatar

Vijay Bhatter VijayBhatter

View GitHub Profile
@VijayBhatter
VijayBhatter / mdn-reset.css
Created November 1, 2023 02:57
MDN Reset
CSS
/*reset.css*/
/* RESETS */
*,
*::before,
*::after {
box-sizing: border-box;
}
*:focus {
outline: 3px dashed #228bec;
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Prevent font size inflation */
html {
-moz-text-size-adjust: none;
@VijayBhatter
VijayBhatter / SecurityHeaders.txt
Last active November 1, 2023 01:52
ASP.NET Core Security Headers
To be added to the Configure method in the Startup.cs in ASP.NET Core app
// public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.Use((context, next) =>
{
context.Response.Headers["Server"] = "Cyberax";
context.Response.Headers["X-Frame-Options"] = "DENY";
context.Response.Headers["X-XSS-Protection"] = "1; mode=block";
context.Response.Headers["X-Content-Type-Options"] = "nosniff";
context.Response.Headers["Strict-Transport-Security"] = "max-age=31536000";