-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.config
More file actions
52 lines (47 loc) · 2.05 KB
/
web.config
File metadata and controls
52 lines (47 loc) · 2.05 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!-- ============================================================
DEFAULT DOCUMENT
============================================================ -->
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
<!-- ============================================================
SECURITY — hide server info and block sensitive paths
============================================================ -->
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<add name="X-Content-Type-Options" value="nosniff" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
<add name="X-XSS-Protection" value="1; mode=block" />
</customHeaders>
</httpProtocol>
<!-- Block direct access to config/, vendor/ and sensitive file types -->
<security>
<requestFiltering>
<hiddenSegments>
<add segment="config" />
<add segment="vendor" />
</hiddenSegments>
<fileExtensions>
<add fileExtension=".ini" allowed="false" />
<add fileExtension=".log" allowed="false" />
<add fileExtension=".sql" allowed="false" />
<add fileExtension=".env" allowed="false" />
<add fileExtension=".bak" allowed="false" />
</fileExtensions>
</requestFiltering>
</security>
<!-- ============================================================
STATIC FILE CACHING
============================================================ -->
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
</system.webServer>
</configuration>