36 lines
1.5 KiB
Plaintext
36 lines
1.5 KiB
Plaintext
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
|
<configuration>
|
||
|
|
<system.webServer>
|
||
|
|
<handlers>
|
||
|
|
<add name="iisnode" path="server.js" verb="*" modules="iisnode" resourceType="File" />
|
||
|
|
</handlers>
|
||
|
|
<rewrite>
|
||
|
|
<rules>
|
||
|
|
<!-- API routes for .NET -->
|
||
|
|
<rule name="API" stopProcessing="true">
|
||
|
|
<match url="^api/.*" />
|
||
|
|
<action type="Rewrite" url="{R:0}" />
|
||
|
|
</rule>
|
||
|
|
|
||
|
|
<!-- React routes -->
|
||
|
|
<rule name="React Routes" stopProcessing="true">
|
||
|
|
<match url=".*" />
|
||
|
|
<conditions logicalGrouping="MatchAll">
|
||
|
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||
|
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||
|
|
<add input="{REQUEST_URI}" pattern="^/api/" negate="true" />
|
||
|
|
</conditions>
|
||
|
|
<action type="Rewrite" url="server.js" />
|
||
|
|
</rule>
|
||
|
|
</rules>
|
||
|
|
</rewrite>
|
||
|
|
<iisnode node_env="production" />
|
||
|
|
|
||
|
|
<!-- Allow access to static files -->
|
||
|
|
<staticContent>
|
||
|
|
<mimeMap fileExtension=".webp" mimeType="image/webp" />
|
||
|
|
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
|
||
|
|
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||
|
|
</staticContent>
|
||
|
|
</system.webServer>
|
||
|
|
</configuration>
|