Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (25 sloc) 821 Bytes
using Api.Handlers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace Api
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
//This is the more correct solution, but it breaks the swagger ui; disabling for now
//Enable Windows Auth/CORS solution module
config.MessageHandlers.Add(new AllowedOriginHandler());
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}