appsettings.json 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {
  2. "Sers": {
  3. /* 网关配置 */
  4. "Gateway": {
  5. "WebHost": {
  6. /* url,可多个 */
  7. "urls": [ "http://*:4582" ],
  8. /* 是否允许跨域访问,默认true */
  9. "allowAnyOrigin": true,
  10. /* http回应中的默认Content-Type。若不指定则默认为 "application/json; charset="+Serialization.Instance.charset */
  11. "//ResponseDefaultContentType": "application/json; charset=UTF-8",
  12. /* 映射静态文件。若不指定则不映射静态文件 */
  13. "//staticFiles": {
  14. /* 请求路径(可不指定)。demo:"/file/static"。The relative request path that maps to static resources */
  15. //"requestPath": "/file",
  16. /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则为默认路径(wwwroot)。demo:"wwwroot/demo" */
  17. //"rootPath": "wwwroot",
  18. /* 默认页面(可不指定)。An ordered list of file names to select by default. List length and ordering may affect performance */
  19. //"defaultFileNames": [],
  20. /* 是否可浏览目录(default false)。Enables directory browsing */
  21. //"useDirectoryBrowser": false,
  22. /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
  23. "contentTypeMapFile": "contentTypeMap.json",
  24. /* 回应静态文件时额外添加的http回应头。可不指定。 */
  25. "responseHeaders": {
  26. //设置浏览器静态文件缓存3600秒
  27. "Cache-Control": "public,max-age=3600"
  28. }
  29. }
  30. }
  31. }
  32. },
  33. /* Vit工具配置,可不指定 */
  34. "Vit": {
  35. /* 日志配置,可不指定 */
  36. "Logger": {
  37. /* print the log to Log/*.txt default:true */
  38. "PrintToTxt": true,
  39. /* print the log to console. default:false */
  40. "PrintToConsole": true
  41. },
  42. /* 队列类型。可为 BlockingCollection(默认)、 ConsumerCache_BlockingCollection(高性能) 、ActionBlock、BufferBlock */
  43. "ConsumerType": "ConsumerCache_BlockingCollection",
  44. /* 序列化配置,可不指定 */
  45. "Serialization": {
  46. /* 序列化字符编码。可不指定,默认 UTF8。只可为 UTF7,UTF8,UTF32,ASCII,Unicode。 */
  47. "Encoding": "UTF8",
  48. /* 时间序列化格式。可不指定,默认 "yyyy-MM-dd HH:mm:ss" */
  49. "DateTimeFormat": "yyyy-MM-dd HH:mm:ss"
  50. },
  51. "//Kestrel": {
  52. /* (int64) the maximum allowed size of any request body in bytes. When set to null, the maximum request body size is unlimited. */
  53. "MaxRequestBodySize": 2000000000,
  54. /* (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. */
  55. "ValueLengthLimit": 2000000000,
  56. /* (int64) A limit for the length of each multipart body. Forms sections that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
  57. "MultipartBodyLengthLimit": 2000000000
  58. }
  59. }
  60. }