appsettings.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {
  2. "Sers": {
  3. /* 网关配置 */
  4. "Gateway": {
  5. "WebHost": {
  6. /* url,可多个 */
  7. "urls": [ "http://*:4582" ],
  8. /* ssl证书,可不指定。若urls中指定了https协议,请在此指定对应的https证书 */
  9. "//certificates": [
  10. {
  11. "filePath": "Data/ssl.pfx",
  12. "password": "Admin0123"
  13. }
  14. ],
  15. /* 重定向所有的http请求到https。若不指定则不重定向 */
  16. "//httpsRedirection": {
  17. /* 重定向的地址。若不指定,则使用发起请求的host */
  18. "host": "serset.com",
  19. /* 重定向的端口号。若不指定,则使用发起请求的port */
  20. "port": 443,
  21. /* The status code used for the redirect response. The default is 307. */
  22. "statusCode": 307
  23. },
  24. /* 是否允许跨域访问,默认true */
  25. "allowAnyOrigin": true,
  26. /* http回应中的默认Content-Type。若不指定则默认为 "application/json; charset="+Serialization.Instance.charset */
  27. "//ResponseDefaultContentType": "application/json; charset=UTF-8",
  28. /* 映射静态文件。若不指定则不映射静态文件 */
  29. "//staticFiles": {
  30. /* 请求路径(可不指定)。demo:"/file/static"。The relative request path that maps to static resources */
  31. //"requestPath": "/file",
  32. /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则为默认路径(wwwroot)。demo:"wwwroot/demo" */
  33. //"rootPath": "wwwroot",
  34. /* 默认页面(可不指定)。An ordered list of file names to select by default. List length and ordering may affect performance */
  35. //"defaultFileNames": [],
  36. /* 是否可浏览目录(default false)。Enables directory browsing */
  37. //"useDirectoryBrowser": false,
  38. /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
  39. "contentTypeMapFile": "contentTypeMap.json",
  40. /* 回应静态文件时额外添加的http回应头。可不指定。 */
  41. "responseHeaders": {
  42. //设置浏览器静态文件缓存3600秒
  43. "Cache-Control": "public,max-age=3600"
  44. }
  45. }
  46. }
  47. }
  48. },
  49. /* Vit工具配置,可不指定 */
  50. "Vit": {
  51. /* 日志配置,可不指定 */
  52. "Logger": {
  53. /* print the log to Log/*.txt default:true */
  54. "PrintToTxt": true,
  55. /* print the log to console. default:true */
  56. "PrintToConsole": true
  57. },
  58. /* 序列化配置,可不指定 */
  59. "Serialization": {
  60. /* 序列化字符编码。可不指定,默认 UTF8。只可为 UTF7,UTF8,UTF32,ASCII,Unicode。 */
  61. "Encoding": "UTF8",
  62. /* 时间序列化格式。可不指定,默认 "yyyy-MM-dd HH:mm:ss" */
  63. "DateTimeFormat": "yyyy-MM-dd HH:mm:ss"
  64. },
  65. "//Kestrel": {
  66. /* (int64) the maximum allowed size of any request body in bytes. When set to null, the maximum request body size is unlimited. */
  67. "MaxRequestBodySize": 2000000000,
  68. /* (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. */
  69. "ValueLengthLimit": 2000000000,
  70. /* (int64) A limit for the length of each multipart body. Forms sections that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
  71. "MultipartBodyLengthLimit": 2000000000
  72. }
  73. },
  74. /* 若不指定,则不输出aspnet日志到控制台输出 */
  75. "Logging": {
  76. "LogLevel": {
  77. "Default": "Warning"
  78. }
  79. }
  80. }