appsettings.json 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. {
  2. "Sers": {
  3. /* 通讯层配置 */
  4. "CL": {
  5. /* 共用配置,子项共用,覆写子项未指定的配置 */
  6. "Config": {
  7. "workThread": {
  8. "mode": "",
  9. /* 后台处理消息的线程个数(单位个,默认2) */
  10. "threadCount": 2,
  11. /* 请求超时时间(单位ms,默认300000) */
  12. "timeoutMs": 300000
  13. },
  14. //HeartBeat
  15. /* 心跳检测时间间隔(单位ms,默认10000,若指定为0则不进行心跳检测) */
  16. "heartBeatIntervalMs": 10000,
  17. /* 心跳检测超时时间(单位ms,默认30000) */
  18. "heartBeatTimeoutMs": 30000,
  19. /* 心跳检测失败重试次数(单位次,默认10) */
  20. "heartBeatRetryCount": 10,
  21. /* 数据传输 加密协议,可多个,可不指定 */
  22. "//security": [
  23. {
  24. // SampleSecurity
  25. /* 在此Assembly中查找security */
  26. "assemblyFile": "Sers.Core.dll",
  27. /* the class of security in assemblyFile. 必须继承接口 Sers.Core.Util.StreamSecurity.ISecurity */
  28. "className": "Sers.Core.Util.StreamSecurity.Security.SampleSecurity",
  29. /* (x.2) config */
  30. /* 加密密钥 */
  31. "secret": "security"
  32. },
  33. {
  34. // SampleSecurity
  35. /* 若不指定assemblyFile和className 则默认为Sers.Core.Util.StreamSecurity.Security.SampleSecurity */
  36. "secret": "Two layer encryption"
  37. }
  38. ],
  39. /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
  40. "secretKey": "SersCL"
  41. },
  42. /* one conn is one channel.can be multiable */
  43. "Server": [
  44. {
  45. //Ipc.NamedPipe
  46. /* (x.1) type */
  47. /* 在此Assembly中查找builder */
  48. "assemblyFile": "Sers.CL.Ipc.NamedPipe.dll",
  49. /* the class of builder in assemblyFile */
  50. //"className": "Sers.CL.Ipc.NamedPipe.OrganizeServerBuilder",
  51. /* (x.2) config */
  52. /* 命名管道名称。例如: "Sers.CL.Ipc" */
  53. "pipeName": "Sers.CL.Ipc.4501"
  54. },
  55. {
  56. // Socket.Iocp
  57. /* (x.1) type - Iocp */
  58. /* the class of builder in assemblyFile */
  59. "className": "Sers.CL.Socket.Iocp.OrganizeServerBuilder",
  60. /* 通信模式(默认值:Simple)。可为 Simple、Timer、ThreadWait */
  61. //"mode": "ThreadWait",
  62. /* 接收缓存区大小(单位:byte,默认:8192) */
  63. //"receiveBufferSize": 8192,
  64. /* 发送缓冲区刷新间隔(单位:毫秒,默认:1)(仅当mode为Timer和ThreadWait时有效) */
  65. //"sendFlushInterval": 1,
  66. /* 发送缓冲区数据块的最小大小(单位:byte,默认 1000000)(仅当mode为Timer和ThreadWait时有效) */
  67. //"sendBufferSize": 1000000,
  68. /* 发送缓冲区个数(默认1024)(仅当mode为Timer和ThreadWait时有效) */
  69. //"sendBufferCount": 1024,
  70. /* (x.2) config */
  71. /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
  72. //"host": "127.0.0.1",
  73. /* 服务端 监听端口号。例如: 4501 */
  74. "port": 4501
  75. },
  76. {
  77. // Socket.ThreadWait
  78. /* (x.1) type - Socket */
  79. /* the class of builder in assemblyFile */
  80. //"className": "Sers.CL.Socket.ThreadWait.OrganizeServerBuilder",
  81. /* (x.2) config */
  82. /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
  83. //"host": "127.0.0.1",
  84. /* 服务端 监听端口号。例如: 4501 */
  85. "port": 4501
  86. },
  87. {
  88. // Zmq.ThreadWait
  89. /* (x.1) type */
  90. /* 在此Assembly中查找builder */
  91. "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
  92. /* the class of builder in assemblyFile */
  93. //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeServerBuilder",
  94. /* (x.2) config */
  95. /* 地址。例如: "tcp://*:4502" 、 "ipc://4502" */
  96. "endpoint": "tcp://*:4502"
  97. },
  98. {
  99. // WebSocket
  100. /* (x.1) type - Iocp */
  101. /* 在此Assembly中查找builder */
  102. "assemblyFile": "Sers.CL.WebSocket.dll",
  103. /* the class of builder in assemblyFile */
  104. //"className": "Sers.CL.WebSocket.OrganizeServerBuilder",
  105. /* (x.2) config */
  106. /* 服务端地址(默认为 "ws://0.0.0.0:4503") */
  107. "host": "ws://0.0.0.0:4503"
  108. },
  109. {
  110. // Zmq.FullDuplex
  111. /* (x.1) type */
  112. /* 在此Assembly中查找builder */
  113. "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
  114. /* the class of builder in assemblyFile */
  115. //"className": "Sers.CL.Zmq.FullDuplex.OrganizeServerBuilder",
  116. /* (x.2) config */
  117. /* 地址。例如: "tcp://*:4504" 、 "ipc://4504" */
  118. "endpoint": "tcp://*:4504"
  119. },
  120. {
  121. //Ipc.SharedMemory
  122. /* (x.1) type - Ipc.SharedMemory */
  123. /* 在此Assembly中查找builder */
  124. "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
  125. /* the class of builder in assemblyFile */
  126. //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
  127. /* (x.2) config */
  128. /* 共享内存名称。例如: "ipcTest" */
  129. "name": "ipcForStationDemo",
  130. /* 共享内存节点个数。例如: 64 */
  131. "nodeCount": 128,
  132. /* 共享内存节点大小。例如: 2048 */
  133. "nodeBufferSize": 102400
  134. },
  135. {
  136. /* (x.1) type - Ipc.SharedMemory */
  137. /* 在此Assembly中查找builder */
  138. "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
  139. /* the class of builder in assemblyFile */
  140. //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
  141. /* (x.2) config */
  142. /* 共享内存名称。例如: "ipcTest" */
  143. "name": "ipcForRobot",
  144. /* 共享内存节点个数。例如: 64 */
  145. "nodeCount": 128,
  146. /* 共享内存节点大小。例如: 2048 */
  147. "nodeBufferSize": 102400
  148. }
  149. ]
  150. },
  151. // RpcData序列化模式。可不指定。默认为Text。
  152. // 可为 Newtonsoft、Text、BytePointor。
  153. // 效率依次递增。BytePointor 序列化为二进制数据而不是json字符串。
  154. "RpcDataSerializeMode": "Text",
  155. /* LocalApiService 配置,可不指定 */
  156. "LocalApiService": {
  157. /* 后台服务的线程个数(单位个,默认0,代表不开启服务)*/
  158. "workThreadCount": 4,
  159. /* 超时时间,若不指定则后台任务永不超时。(主动关闭超过此时间的任务,实际任务强制关闭的时间会在1倍超时时间到2倍超时时间内)。单位:ms。*/
  160. //"timeout_ms": 300000,
  161. /* 是否 输出本地Api的调用信息到(ApiTrace)Log文件。默认:false */
  162. "PrintTrace": false,
  163. /* 静态文件映射器。映射站点静态文件,可多个,可不指定 */
  164. "//staticFiles": [
  165. {
  166. /* api路由前缀,例如 "/demo/ui/*" */
  167. "route": "/demo/ui/*",
  168. /* api描述,静态文件描述 */
  169. "apiName": "demo站点静态文件",
  170. /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则默认为入口程序所在目录。demo:"wwwroot/demo" */
  171. "rootPath": "wwwroot/demo",
  172. /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
  173. "contentTypeMapFile": "contentTypeMap.json",
  174. /* 回应静态文件时额外添加的http回应头。可不指定。 */
  175. "responseHeaders": {
  176. //设置浏览器静态文件缓存3600秒
  177. "Cache-Control": "public,max-age=3600"
  178. }
  179. }
  180. ],
  181. /* 默认站点名称,可多个,可不指定 */
  182. //"apiStationNames": [ "demo" ],
  183. /* Api加载器配置 */
  184. "//ApiLoaders": [
  185. {
  186. /* 在此Assembly中查找api加载器(如 Sers.Core.dll 、Sers.NetcoreLoader.dll 、 Sers.Serslot.dll ) */
  187. //"loader_assemblyFile": "Sers.Core.dll",
  188. /* 加载器的类名,可为 Sers.SersLoader.ApiLoader 、 Sers.NetcoreLoader.ApiLoader、 Sers.Serslot.ApiLoader 等。若不指定则默认为"Sers.SersLoader.ApiLoader" */
  189. //"loader_className": "Sers.SersLoader.ApiLoader",
  190. //(通过反射从此包中获取要加载的api)
  191. /* 在此Assembly中查找服务(如 Did.SersLoader.Demo.dll)(assembly、assemblyFile、assemblyName 指定任一即可) */
  192. "assemblyFile": "Did.SersLoader.Demo.dll",
  193. /* 在此Assembly中查找服务(如 Did.SersLoader.Demo)(assembly、assemblyFile、assemblyName 指定任一即可) */
  194. //"assemblyName": "Did.SersLoader.Demo",
  195. /* 强制指定ApiStation名称。可不指定。(优先级从高到低: apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
  196. //"apiStationName_Force": "",
  197. /* ApiStation名称。可不指定。(优先级从高到低: apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
  198. "apiStationName": "demo"
  199. /* 强制路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低: routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix) */
  200. //"routePrefix_Force": "",
  201. /* 路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低: routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix ) */
  202. //"routePrefix": ""
  203. }
  204. ],
  205. /* 调用Api时的自定义Scope对象。可不指定。事件顺序为 OnCreateScope -> BeforeCallApi -> OnDispose */
  206. "//OnCreateScope": [
  207. {
  208. /* 在此Assembly中加载类 */
  209. "assemblyFile": "Sers.ApiTrace.dll",
  210. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.ApiScope.IApiScopeEvent */
  211. "className": "Sers.ApiTrace.ApiScope"
  212. }
  213. ],
  214. /* 调用api前的事件,可不指定。事件顺序为 OnCreateScope -> BeforeCallApi -> OnDispose */
  215. "//BeforeCallApi": [
  216. {
  217. /* 在此Assembly中加载类 */
  218. "assemblyFile": "Sers.Core.dll",
  219. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
  220. "className": "Bearer",
  221. //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
  222. /* 验证at接口的地址 */
  223. "api_verifyAt": "/AuthCenter/account/verifyAt",
  224. /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
  225. "api_httpMethod": "POST"
  226. },
  227. {
  228. //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
  229. "className": "AccountInCookie",
  230. "account": [
  231. {
  232. "userToken": "admin_123456",
  233. //"CallerSource": "Internal",
  234. "userInfo": {
  235. "name": "超级管理员",
  236. "入口": "Gover网关"
  237. }
  238. }
  239. ]
  240. }
  241. ]
  242. },
  243. /* ServiceStation配置,可不指定 */
  244. "ServiceStation": {
  245. /* 自动上报cpu Usage。不指定则不上报 */
  246. "//UsageReporter": {
  247. /* 上报时间间隔(单位:秒) */
  248. "intervalSecond": 2
  249. },
  250. /* serviceStation站点信息 */
  251. "serviceStationInfo": {
  252. /* 服务站点名称 */
  253. "serviceStationName": "ServiceCenter",
  254. /* 服务站点版本信息,若不指定则为入口链接库的版本号 */
  255. //"stationVersion": "2.1.1",
  256. /* [json]服务站点额外信息,可不指定 */
  257. "info": null
  258. }
  259. },
  260. /* ServiceCenter 配置,可不指定 */
  261. "ServiceCenter": {
  262. /* 是否 输出Api注册事件到(Info)Log文件。默认:true */
  263. "ApiRegistEvent_Print": true,
  264. /* api路由管理方式,可不指定。可为:"RESTful","IgnoreHttpMethod"。若不指定或未指定有效值,则默认为"RESTful" */
  265. //"ApiRouteType": "IgnoreHttpMethod",
  266. //调用api前的事件,可不指定
  267. "//BeforeCallApi": [
  268. {
  269. /* 在此Assembly中加载类 */
  270. "assemblyFile": "Sers.Core.dll",
  271. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
  272. "className": "Bearer",
  273. //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
  274. /* 验证at接口的地址 */
  275. "api_verifyAt": "/AuthCenter/account/verifyAt",
  276. /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
  277. "api_httpMethod": "POST"
  278. },
  279. {
  280. //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
  281. //"className": "AccountInCookie",
  282. "account": [
  283. {
  284. "userToken": "admin_123456",
  285. //"CallerSource": "Internal",
  286. "userInfo": {
  287. "name": "超级管理员",
  288. "入口": "Gover网关"
  289. }
  290. }
  291. ]
  292. }
  293. ]
  294. },
  295. /* 动态加载的App事件 */
  296. "AppEvent": [
  297. { //记录请求Trace到Zipkin
  298. /* 在此Assembly中加载类 */
  299. "assemblyFile": "Sers.Gover.Apm.Zipkin.dll",
  300. /* 动态加载的类名,必须继承接口 Sers.Core.Module.App.AppEvent.IAppEvent */
  301. //"className": "Sers.Gover.Apm.Zipkin.AppEvent",
  302. //启用Zipkin链路追踪(自动提交应用调用信息)
  303. /* 配置 */
  304. "SamplingRate": "1.0",
  305. "zipkinCollectorUrl": "http://sers.cloud:9411",
  306. /* 若不指定则默认为ServiceCenter */
  307. "rpcName": "ServiceCenter",
  308. "tags": {
  309. // 可为 requestRpc requestData responseRpc responseData
  310. "traceName": "demoTrace",
  311. "route": "{{requestRpc.route}}",
  312. "{{requestRpc.route}}": "route",
  313. "url": "{{requestRpc.http.url}}",
  314. "method": "{{requestRpc.http.method}}",
  315. "requestRpc": "{{requestRpc}}",
  316. //"requestData": "{{requestData}}",
  317. "responseRpc": "{{responseRpc}}",
  318. "responseState": "{{responseRpc.http.headers.responseState}}",
  319. "responseError_Base64": "{{responseRpc.http.headers.responseError_Base64}}"
  320. //"responseData": "{{responseData}}",
  321. //"responseData.error": "{{responseData.error}}"
  322. }
  323. },
  324. { //记录请求Trace到 Log/{yyyy-MM}/[{yyyy-MM-dd}]ApiTrace.txt文件
  325. /* 在此Assembly中加载类 */
  326. "assemblyFile": "Sers.Gover.Apm.Txt.dll",
  327. /* 动态加载的类名,必须继承接口 Sers.Core.Module.App.AppEvent.IAppEvent */
  328. //"className": "Sers.Gover.Apm.Txt.AppEvent",
  329. "tags": {
  330. // 可为 requestRpc requestData responseRpc responseData
  331. "From": "Sers.Gover.Apm.Txt",
  332. "route": "{{requestRpc.route}}",
  333. //"{{requestRpc.route}}": "route",
  334. "url": "{{requestRpc.http.url}}",
  335. "method": "{{requestRpc.http.method}}",
  336. "requestRpc": "{{requestRpc}}",
  337. //"requestData": "{{requestData}}",
  338. "responseRpc": "{{responseRpc}}",
  339. "responseState": "{{responseRpc.http.headers.responseState}}"
  340. //"responseError_Base64": "{{responseRpc.http.headers.responseError_Base64}}"
  341. //"responseData": "{{responseData}}",
  342. //"responseData.error": "{{responseData.error}}"
  343. }
  344. }
  345. ],
  346. /* 网关配置。若不指定,则不开启网关服务 */
  347. "Gateway": {
  348. /* Rpc配置,可不指定 */
  349. "Rpc": {
  350. /* 网关转发的请求中的rpc 信息中的 CallerSource。(暗指调用来源,默认"OutSide") */
  351. //"CallerSource": "OutSide"
  352. },
  353. "WebHost": {
  354. /* url,可多个 */
  355. "urls": [ "http://*:4580" ],
  356. /* 是否允许跨域访问,默认true */
  357. "allowAnyOrigin": true,
  358. /* 把请求的ip地址、端口号复制到请求头中的前缀。若不指定则不复制。 */
  359. "prefixOfCopyIpToHeader": "Sers-Gateway-",
  360. /* http回应中的默认Content-Type。若不指定则默认为 "application/json; charset="+Serialization.Instance.charset */
  361. "//ResponseDefaultContentType": "application/json; charset=UTF-8",
  362. /* 映射静态文件。若不指定则不映射静态文件 */
  363. "staticFiles": {
  364. /* 请求路径(可不指定)。demo:"/file/static"。The relative request path that maps to static resources */
  365. //"requestPath": "/file",
  366. /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则为默认路径(wwwroot)。demo:"wwwroot/demo" */
  367. //"rootPath": "wwwroot",
  368. /* 默认页面(可不指定)。An ordered list of file names to select by default. List length and ordering may affect performance */
  369. "defaultFileNames": [ "index.html" ],
  370. /* 是否可浏览目录(default false)。Enables directory browsing */
  371. //"useDirectoryBrowser": false,
  372. /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
  373. "contentTypeMapFile": "contentTypeMap.json",
  374. /* 回应静态文件时额外添加的http回应头。可不指定。 */
  375. "responseHeaders": {
  376. //设置浏览器静态文件缓存3600秒
  377. "Cache-Control": "public,max-age=3600"
  378. }
  379. }
  380. },
  381. //调用api前的事件,可不指定
  382. "BeforeCallApi": [
  383. {
  384. /* 在此Assembly中加载类 */
  385. "assemblyFile": "Sers.Core.dll",
  386. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
  387. //"className": "Bearer",
  388. //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
  389. /* 验证at接口的地址 */
  390. "api_verifyAt": "/AuthCenter/account/verifyAt",
  391. /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
  392. "api_httpMethod": "POST"
  393. },
  394. {
  395. //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
  396. "className": "AccountInCookie",
  397. "account": [
  398. {
  399. "userToken": "admin_123456",
  400. "CallerSource": "Internal",
  401. "userInfo": {
  402. "name": "Gover管理员",
  403. "入口": "Gover网关"
  404. }
  405. }
  406. ]
  407. }
  408. ],
  409. /* 服务限流配置,可不指定 */
  410. "rateLimit": [
  411. {
  412. /* 服务限流key,标识一个限流服务,必须唯一 */
  413. "rateLimitKey": "rate",
  414. /* 固定时间窗口限流。在单位时间(msInterval)内限制最大请求数量为reqLimit。超出数量的请求将被拒绝 */
  415. "rateLimitType": "FixedWindow",
  416. /* 单位时间内最大请求数量(个)*/
  417. "reqLimit": 100000,
  418. /* 单位时间长度(单位:ms)*/
  419. "msInterval": 1000
  420. }
  421. ]
  422. }
  423. },
  424. /* Vit工具配置,可不指定 */
  425. "Vit": {
  426. /* 日志配置,可不指定 */
  427. "Logger": {
  428. /* print the log to Log/*.txt default:true */
  429. "PrintToTxt": true,
  430. /* print the log to console. default:true */
  431. "PrintToConsole": true
  432. },
  433. /* 队列模式,可不指定。可为 BlockingCollection(默认)、 ConsumerCache_BlockingCollection(高性能) */
  434. "ConsumerMode": "BlockingCollection",
  435. /* 序列化配置,可不指定 */
  436. "Serialization": {
  437. /* 序列化字符编码。可不指定,默认 UTF8。只可为 UTF7,UTF8,UTF32,ASCII,Unicode。 */
  438. "Encoding": "UTF8",
  439. /* 时间序列化格式。可不指定,默认 "yyyy-MM-dd HH:mm:ss" */
  440. "DateTimeFormat": "yyyy-MM-dd HH:mm:ss"
  441. },
  442. "//Kestrel": {
  443. /* (int64) the maximum allowed size of any request body in bytes. When set to null, the maximum request body size is unlimited. */
  444. "MaxRequestBodySize": 2000000000,
  445. /* (int32) A limit on the length of individual form values. Forms containing values that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
  446. "ValueLengthLimit": 2000000000,
  447. /* (int64) A limit for the length of each multipart body. Forms sections that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
  448. "MultipartBodyLengthLimit": 2000000000
  449. }
  450. }
  451. }