-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.config
28 lines (28 loc) · 1.31 KB
/
web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Exclude direct access to webroot/*" stopProcessing="true">
<match url="^webroot/(.*)$" ignoreCase="false" />
<action type="None" />
</rule>
<rule name="Rewrite routed access to assets(img, css, files, js, favicon)" stopProcessing="true">
<match url="^(ads|img|css|fonts|json|libraries|files|js|favicon.ico|robots\.txt|sitemap*)(.*)$" />
<action type="Rewrite" url="webroot/{R:1}{R:2}" appendQueryString="false" />
</rule>
<rule name="Rewrite requested file/folder to index.php" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="POST" />
<add name="Access-Control-Allow-Headers" value="Authorization, Access-Control-Allow-Origin, Content-Type" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>