Skip to content

Instantly share code, notes, and snippets.

@hendrasyp
hendrasyp / cache.htaccess
Created March 7, 2017 05:01 — forked from jcanfield/cache.htaccess
.htaccess caching rules
<IfModule mod_mime.c>
# Text
AddType text/css .css
AddType application/x-javascript .js
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType text/plain .txt
AddType text/xml .xml
@hendrasyp
hendrasyp / FilterIPAttribute.cs
Created November 8, 2019 03:19 — forked from rdingwall/FilterIPAttribute.cs
FilterIPAttribute for ASP.NET Web API (IIS only, port of MVC version from http://stackoverflow.com/a/4605086/91551)
using System;
using System.Configuration;
using System.Web;
using System.Web.Http;
using System.Web.Http.Controllers;
namespace Miscellaneous.Attributes.Controller
{
/// <summary>
/// Filter by IP address (ASP.NET Web API version)