using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Jp.ApiCam.Infrastructures
{
///
///
///
public class HttpInterceptModule : IHttpModule
{
public void Dispose()
{
//throw new NotImplementedException();
}
///
///
///
///
///
protected void ContextAuthenticateRequest(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
var absolutePath = HttpContext.Current.Request.Url.AbsolutePath.ToLower();
if (absolutePath == "/") HttpContext.Current.Response.Redirect("/swagger");
}
public void Init(HttpApplication context)
{
context.AuthenticateRequest += ContextAuthenticateRequest;
}
}
}