Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-2921: Disable TRACE/TRACK #683

Open
wants to merge 2 commits into
base: 2.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/apache2/vhost.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
<IfModule mod_rewrite.c>
RewriteEngine On

# Make sure TRACE and TRACK methods are denied
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) [NC]
RewriteRule .* - [F]

# For FastCGI mode or when using PHP-FPM, to get basic auth working.
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Expand Down
5 changes: 5 additions & 0 deletions doc/nginx/vhost.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ server {

root %BASEDIR%/web;

# Make sure TRACE and TRACK methods are denied
if ($request_method ~* ^(TRACE|TRACK)$) {
return 405;
}

# Additional Assetic rules
## Don't forget to run php bin/console assetic:dump --env=prod
## and make sure to comment these out in DEV environment.
Expand Down