web.config 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <staticContent>
  5. <mimeMap fileExtension=".dwg" mimeType="application/acad" />
  6. <mimeMap fileExtension=".ipa" mimeType="application/octet-stream" />
  7. <mimeMap fileExtension=".plist" mimeType="text/xml" />
  8. </staticContent>
  9. <security>
  10. <requestFiltering>
  11. <requestLimits maxUrl="40960" maxQueryString="20480" />
  12. </requestFiltering>
  13. </security>
  14. <httpProtocol>
  15. <customHeaders>
  16. <remove name="X-Powered-By" />
  17. </customHeaders>
  18. </httpProtocol>
  19. <rewrite>
  20. <rules>
  21. <rule name="wwwroot-static" stopProcessing="true">
  22. <match url="([\S]+[.](html|htm|svg|js|css|png|gif|jpg|jpeg|ico|eot|woff|woff2))" />
  23. <conditions logicalGrouping="MatchAll">
  24. <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  25. <add input="{REQUEST_URI}" pattern="api/" negate="true" />
  26. <add input="{REQUEST_URI}" pattern="report/" negate="true" />
  27. <add input="{REQUEST_URI}" pattern="files/" negate="true" />
  28. </conditions>
  29. <action type="Rewrite" url="wwwroot/frontend/{R:1}" />
  30. </rule>
  31. <rule name="empty-root-index" stopProcessing="true">
  32. <match url="^$" />
  33. <action type="Rewrite" url="wwwroot/frontend/index.html" />
  34. </rule>
  35. <rule name="React Routes" stopProcessing="true">
  36. <match url=".*" />
  37. <conditions logicalGrouping="MatchAll">
  38. <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  39. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  40. <add input="{REQUEST_URI}" pattern="api/" negate="true" />
  41. <add input="{REQUEST_URI}" pattern="files/" negate="true" />
  42. <add input="{REQUEST_URI}" pattern="report/" negate="true" />
  43. </conditions>
  44. <action type="Rewrite" url="wwwroot/frontend/index.html" />
  45. </rule>
  46. </rules>
  47. </rewrite>
  48. <handlers>
  49. <add name="aspNetCore" path="api" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
  50. <add name="aspNetCoreFiles" path="files" verb="GET" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
  51. <add name="aspNetCoreReport" path="report" verb="GET" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
  52. </handlers>
  53. <aspNetCore processPath="dotnet" arguments=".\FMSAdmin.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
  54. </system.webServer>
  55. </configuration>