-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy path.htaccess
More file actions
178 lines (168 loc) · 12 KB
/
.htaccess
File metadata and controls
178 lines (168 loc) · 12 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# bad spiders
SetEnvIfNoCase User-agent QQGameHall blocked=1
deny from env=blocked
ErrorDocument 404 /404.html
RedirectPermanent /news.html https://curl.se/changes.html
RedirectPermanent /devel.html https://curl.se/dev/
RedirectPermanent /auto/ https://curl.se/dev/
RedirectPermanent /docs/internals.html https://curl.se/dev/internals.html
RedirectPermanent /docs/contribute.html https://curl.se/dev/contribute.html
RedirectPermanent /docs/runtests.html https://curl.se/dev/runtests.html
RedirectPermanent /docs/testcurl.html https://curl.se/dev/testcurl.html
RedirectPermanent /source.html https://curl.se/dev/source.html
RedirectPermanent /bugreport.html https://curl.se/docs/bugs.html
RedirectPermanent /cvs.cgi https://curl.se/dev/source.html
RedirectPermanent /cvs.html https://curl.se/dev/source.html
RedirectPermanent /libcurl/c/libcurl-thread.html https://curl.se/libcurl/c/threadsafe.html
RedirectPermanent /libcurl/c/libcurl-security.html https://curl.se/libcurl/security.html
RedirectPermanent /libcurl/c/curl-config.html https://curl.se/libcurl/using/curl-config.html
RedirectMatch "^/.git" https://curl.se/dev/source.html
RedirectPermanent /dev/secprocess.html https://curl.se/dev/vuln-disclosure.html
RedirectPermanent /dev/security.html https://curl.se/dev/vuln-disclosure.html
RedirectPermanent /dev/FILEFORMAT.md https://github.com/curl/curl/blob/master/tests/FILEFORMAT.md
# old advisory pages
RedirectPermanent /docs/adv_2018-70a2.html https://curl.se/docs/CVE-2018-0500.html
RedirectPermanent /docs/adv_2018-82c2.html https://curl.se/docs/CVE-2018-1000300.html
RedirectPermanent /docs/adv_2018-b138.html https://curl.se/docs/CVE-2018-1000301.html
RedirectPermanent /docs/adv_2018-b047.html https://curl.se/docs/CVE-2018-1000122.html
RedirectPermanent /docs/adv_2018-97a2.html https://curl.se/docs/CVE-2018-1000121.html
RedirectPermanent /docs/adv_2018-9cd6.html https://curl.se/docs/CVE-2018-1000120.html
RedirectPermanent /docs/adv_2018-b3bf.html https://curl.se/docs/CVE-2018-1000007.html
RedirectPermanent /docs/adv_2018-824a.html https://curl.se/docs/CVE-2018-1000005.html
RedirectPermanent /docs/adv_2017-af0a.html https://curl.se/docs/CVE-2017-8818.html
RedirectPermanent /docs/adv_2017-ae72.html https://curl.se/docs/CVE-2017-8817.html
RedirectPermanent /docs/adv_2017-12e7.html https://curl.se/docs/CVE-2017-8816.html
RedirectPermanent /docs/adv_20171023.html https://curl.se/docs/CVE-2017-1000257.html
RedirectPermanent /docs/adv_20171004.html https://curl.se/docs/CVE-2017-1000254.html
RedirectPermanent /docs/adv_20170809A.html https://curl.se/docs/CVE-2017-1000101.html
RedirectPermanent /docs/adv_20170809B.html https://curl.se/docs/CVE-2017-1000100.html
RedirectPermanent /docs/adv_20170809C.html https://curl.se/docs/CVE-2017-1000099.html
RedirectPermanent /docs/adv_20170614.html https://curl.se/docs/CVE-2017-9502.html
RedirectPermanent /docs/adv_20170419.html https://curl.se/docs/CVE-2017-7468.html
RedirectPermanent /docs/adv_20170403.html https://curl.se/docs/CVE-2017-7407.html
RedirectPermanent /docs/adv_20170222.html https://curl.se/docs/CVE-2017-2629.html
RedirectPermanent /docs/adv_20161223.html https://curl.se/docs/CVE-2016-9594.html
RedirectPermanent /docs/adv_20161221A.html https://curl.se/docs/CVE-2016-9586.html
RedirectPermanent /docs/adv_20161221B.html https://curl.se/docs/CVE-2016-9952.html
RedirectPermanent /docs/adv_20161221C.html https://curl.se/docs/CVE-2016-9953.html
RedirectPermanent /docs/adv_20161102A.html https://curl.se/docs/CVE-2016-8615.html
RedirectPermanent /docs/adv_20161102B.html https://curl.se/docs/CVE-2016-8616.html
RedirectPermanent /docs/adv_20161102C.html https://curl.se/docs/CVE-2016-8617.html
RedirectPermanent /docs/adv_20161102D.html https://curl.se/docs/CVE-2016-8618.html
RedirectPermanent /docs/adv_20161102E.html https://curl.se/docs/CVE-2016-8619.html
RedirectPermanent /docs/adv_20161102F.html https://curl.se/docs/CVE-2016-8620.html
RedirectPermanent /docs/adv_20161102G.html https://curl.se/docs/CVE-2016-8621.html
RedirectPermanent /docs/adv_20161102H.html https://curl.se/docs/CVE-2016-8622.html
RedirectPermanent /docs/adv_20161102I.html https://curl.se/docs/CVE-2016-8623.html
RedirectPermanent /docs/adv_20161102J.html https://curl.se/docs/CVE-2016-8624.html
RedirectPermanent /docs/adv_20161102K.html https://curl.se/docs/CVE-2016-8625.html
RedirectPermanent /docs/adv_20160914.html https://curl.se/docs/CVE-2016-7167.html
RedirectPermanent /docs/adv_20160907.html https://curl.se/docs/CVE-2016-7141.html
RedirectPermanent /docs/adv_20160803A.html https://curl.se/docs/CVE-2016-5419.html
RedirectPermanent /docs/adv_20160803B.html https://curl.se/docs/CVE-2016-5420.html
RedirectPermanent /docs/adv_20160803C.html https://curl.se/docs/CVE-2016-5421.html
RedirectPermanent /docs/adv_20160530.html https://curl.se/docs/CVE-2016-4802.html
RedirectPermanent /docs/adv_20160518.html https://curl.se/docs/CVE-2016-3739.html
RedirectPermanent /docs/adv_20160127B.html https://curl.se/docs/CVE-2016-0754.html
RedirectPermanent /docs/adv_20160127A.html https://curl.se/docs/CVE-2016-0755.html
RedirectPermanent /docs/adv_20150617B.html https://curl.se/docs/CVE-2015-3237.html
RedirectPermanent /docs/adv_20150617A.html https://curl.se/docs/CVE-2015-3236.html
RedirectPermanent /docs/adv_20150429.html https://curl.se/docs/CVE-2015-3153.html
RedirectPermanent /docs/adv_20150422D.html https://curl.se/docs/CVE-2015-3144.html
RedirectPermanent /docs/adv_20150422C.html https://curl.se/docs/CVE-2015-3145.html
RedirectPermanent /docs/adv_20150422B.html https://curl.se/docs/CVE-2015-3148.html
RedirectPermanent /docs/adv_20150422A.html https://curl.se/docs/CVE-2015-3143.html
RedirectPermanent /docs/adv_20150108A.html https://curl.se/docs/CVE-2014-8151.html
RedirectPermanent /docs/adv_20150108B.html https://curl.se/docs/CVE-2014-8150.html
RedirectPermanent /docs/adv_20141105.html https://curl.se/docs/CVE-2014-3707.html
RedirectPermanent /docs/adv_20140910B.html https://curl.se/docs/CVE-2014-3620.html
RedirectPermanent /docs/adv_20140910A.html https://curl.se/docs/CVE-2014-3613.html
RedirectPermanent /docs/adv_20140326D.html https://curl.se/docs/CVE-2014-2522.html
RedirectPermanent /docs/adv_20140326C.html https://curl.se/docs/CVE-2014-1263.html
RedirectPermanent /docs/adv_20140326B.html https://curl.se/docs/CVE-2014-0139.html
RedirectPermanent /docs/adv_20140326A.html https://curl.se/docs/CVE-2014-0138.html
RedirectPermanent /docs/adv_20140129.html https://curl.se/docs/CVE-2014-0015.html
RedirectPermanent /docs/adv_20131217.html https://curl.se/docs/CVE-2013-6422.html
RedirectPermanent /docs/adv_20131115.html https://curl.se/docs/CVE-2013-4545.html
RedirectPermanent /docs/adv_20130622.html https://curl.se/docs/CVE-2013-2174.html
RedirectPermanent /docs/adv_20130412.html https://curl.se/docs/CVE-2013-1944.html
RedirectPermanent /docs/adv_20130206.html https://curl.se/docs/CVE-2013-0249.html
RedirectPermanent /docs/adv_20120124B.html https://curl.se/docs/CVE-2011-3389.html
RedirectPermanent /docs/adv_20120124.html https://curl.se/docs/CVE-2012-0036.html
RedirectPermanent /docs/adv_20110623.html https://curl.se/docs/CVE-2011-2192.html
RedirectPermanent /docs/adv_20101013.html https://curl.se/docs/CVE-2010-3842.html
RedirectPermanent /docs/adv_20100209.html https://curl.se/docs/CVE-2010-0734.html
RedirectPermanent /docs/adv_20090812.html https://curl.se/docs/CVE-2009-2417.html
RedirectPermanent /docs/adv_20090303.html https://curl.se/docs/CVE-2009-0037.html
RedirectPermanent /docs/adv_20070710.html https://curl.se/docs/CVE-2007-3564.html
RedirectPermanent /docs/adv_20060320.html https://curl.se/docs/CVE-2006-1061.html
RedirectPermanent /docs/adv_20051207.html https://curl.se/docs/CVE-2005-4077.html
RedirectPermanent /docs/adv_20051013.html https://curl.se/docs/CVE-2005-3185.html
RedirectPermanent /docs/adv_20050221A.html https://curl.se/docs/CVE-2005-0490.html
RedirectPermanent /docs/adv_20050221B.html https://curl.se/docs/CVE-2005-0490.html
RedirectPermanent /docs/adv_20030803.html https://curl.se/docs/CVE-2003-1605.html
RedirectPermanent /docs/adv_20001013.html https://curl.se/docs/CVE-2000-0973.html
RedirectPermanent /help.html https://curl.se/docs/help-us.html
RedirectPermanent /legal/thename.html https://curl.se/docs/thename.html
RedirectPermanent /support https://curl.se/support.html
RedirectPermanent /docs/websockets.html https://curl.se/docs/websocket.html
RedirectPermanent /docs/manual.html https://curl.se/docs/tutorial.html
RedirectPermanent /docs/bugbounty.html https://curl.se/dev/vuln-disclosure.html
RemoveHandler .php
RemoveHandler .pl
#AddType text/plain .pl
AddType text/plain .php
AddType application/octet-stream .rpm
AddType application/x-bzip2 .bz2
AddType application/x-tar .tar
AddType application/x-pem-file .pem
Header set Content-Security-Policy: "upgrade-insecure-requests; block-all-mixed-content; default-src 'none'; img-src 'self'; style-src 'unsafe-inline' 'self'; form-action 'self'; frame-ancestors 'none'; require-trusted-types-for 'script';"
Header set Cross-Origin-Embedder-Policy: "require-corp"
Header set Cross-Origin-Opener-Policy: "same-origin"
Header set Cross-Origin-Resource-Policy: "same-origin"
Header set Permissions-Policy: "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), usb=(), web-share=(), xr-spatial-tracking=()"
Header set Referrer-Policy: "strict-origin"
Header set X-Content-Type-Options: "nosniff"
Header set X-Frame-Options: "deny"
# Don't set CSP and CORP on CSS files because they are also loaded from other domains
<FilesMatch ".+\.(css|jpg|png|gif|txt|zip|mp3)$">
Header unset Content-Security-Policy:
Header unset Cross-Origin-Resource-Policy:
</FilesMatch>
# Google Custom Search requires unsafe-eval & unsafe-inline in the CSP which
# knocks a giant hole in the protection a CSP provides. Therefore, only use
# that on the pages where custom search is used to mitigate it somewhat. The
# search page that shows up on the 404 error page will not be matched by this,
# however. The following link is supposed to be updated when Google fixes this
# CSP issue and this hack can be removed:
# https://support.google.com/programmable-search/thread/60663049?hl=en
# The hash is for the inline script in sitesearch.t
<FilesMatch "^search\.html$|^list\.cgi$">
Header set Content-Security-Policy: "upgrade-insecure-requests; block-all-mixed-content; default-src 'self' curl.se cse.google.com www.google.com www.googleapis.com clients1.google.com; style-src 'unsafe-inline' 'self' curl.se www.google.com; script-src 'unsafe-eval' 'self' curl.se cse.google.com www.google.com clients1.google.com 'sha256-n9QfETfN26toA8vPrDtfLIC9jm4B8HE2KsS/pOkgPJ4=';"
</FilesMatch>
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 minute"
ExpiresByType image/gif "access plus 6 months"
ExpiresByType image/jpeg "access plus 6 months"
ExpiresByType image/png "access plus 6 months"
ExpiresByType image/svg+xml "access plus 6 months"
ExpiresByType image/vnd.microsoft.icon "access plus 6 months"
ExpiresByType text/css "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType application/xml "access plus 7 days"
ExpiresByType text/xml "access plus 7 days"
ExpiresByType application/x-gzip "access plus 1 year"
ExpiresByType application/x-bzip2 "access plus 1 year"
ExpiresByType application/zip "access plus 1 year"
ExpiresByType application/x-tar "access plus 1 year"
ExpiresByType application/x-pem-file "access plus 30 minutes"
</ifmodule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond expr "! %{HTTP_HOST} -strmatch 'curl.se'"
RewriteCond expr "! %{HTTP_HOST} -strmatch 'curl.local'"
RewriteRule (.*) https://curl.se%{REQUEST_URI} [R=301,L]
</IfModule>