Skip to content

Commit

Permalink
#45 | ...
Browse files Browse the repository at this point in the history
  • Loading branch information
LuongXuanNhat committed Dec 7, 2023
1 parent 806c4dc commit 50e3bd8
Showing 1 changed file with 39 additions and 34 deletions.
73 changes: 39 additions & 34 deletions src/web.config
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="./index.html" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".svg" allowed="true" />
<add fileExtension=".woff" allowed="true" />
<add fileExtension=".woff2" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>

<httpProtocol>
<customHeaders>
<!-- <add name="X-Content-Type-Options" value="no-sniff"/>
<add name="X-Frame-Options" value="SAMEORIGIN"/>
<add name="X-Xss-Protection" value="1; mode=block"/>
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains"/> -->
</customHeaders>
</httpProtocol>
<httpRedirect enabled="false" destination="" />
</system.webServer>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
<remove fileExtension=".woff"/>
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
</staticContent>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".svg" allowed="true" />
<add fileExtension=".woff" allowed="true" />
<add fileExtension=".woff2" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>

<httpProtocol>
<customHeaders>
<!-- <add name="X-Content-Type-Options" value="no-sniff"/>
<add name="X-Frame-Options" value="SAMEORIGIN"/>
<add name="X-Xss-Protection" value="1; mode=block"/>
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains"/> -->
</customHeaders>
</httpProtocol>
<httpRedirect enabled="false" destination="" />
</system.webServer>

</configuration>

0 comments on commit 50e3bd8

Please sign in to comment.