File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 55# Prevent Apache from responding to `TRACE` HTTP request.
66#
77# The TRACE method, while apparently harmless, can be successfully
8- # leveraged in some scenarios to steal legitimate users' credentials
8+ # leveraged in some scenarios to steal legitimate users' credentials.
99#
1010# Modern browsers now prevent TRACE requests being made via JavaScript,
1111# however, other ways of sending TRACE requests with browsers have been
1212# discovered, such as using Java.
1313#
14- # (!) The `TraceEnable` directive will only work in the main server
15- # configuration file, so don't try to enable it in the `.htaccess` file!
14+ # (!) If you have access to the main server configuration file, use the
15+ # `TraceEnable` directive instead.
1616#
1717# https://tools.ietf.org/html/rfc7231#section-4.3.8
1818# https://www.owasp.org/index.php/Cross_Site_Tracing
1919# https://www.owasp.org/index.php/Test_HTTP_Methods_(OTG-CONFIG-006)
2020# https://httpd.apache.org/docs/current/mod/core.html#traceenable
2121
22- TraceEnable Off
22+ <IfModule mod_rewrite.c>
23+ RewriteEngine On
24+ RewriteCond %{REQUEST_METHOD} ^TRACE [NC]
25+ RewriteRule .* - [R=405,L]
26+ </IfModule>
You can’t perform that action at this time.
0 commit comments