baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Cors;
|
||||
|
||||
|
||||
namespace GuangFu.StringTracing
|
||||
{
|
||||
public static class WebApiConfig
|
||||
{
|
||||
public static void Register(HttpConfiguration config)
|
||||
{
|
||||
// 启用CORS(跨域资源共享)
|
||||
// 方法1:全局启用CORS(允许所有来源)
|
||||
var cors = new EnableCorsAttribute("*", "*", "*");
|
||||
config.EnableCors(cors);
|
||||
|
||||
config.Routes.MapHttpRoute(
|
||||
name: "DefaultApi",
|
||||
routeTemplate: "api/{controller}/{action}/{id}",
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
);
|
||||
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user