Commit f92bf08a authored by dpovshed's avatar dpovshed Committed by colan

Issue #3020103 by dpovshed: Allow Nginx downloads for "vcard" & "vcf" files.

parent 25cda9be
...@@ -801,7 +801,7 @@ location ^~ /files/ { ...@@ -801,7 +801,7 @@ location ^~ /files/ {
try_files /sites/$main_site_name/files/imagecache/$1 $uri @drupal; try_files /sites/$main_site_name/files/imagecache/$1 $uri @drupal;
} }
location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa|css|js)$ { location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa|css|js)$ {
expires 30d; expires 30d;
tcp_nodelay off; tcp_nodelay off;
access_log off; access_log off;
...@@ -820,7 +820,7 @@ location ^~ /files/ { ...@@ -820,7 +820,7 @@ location ^~ /files/ {
### Map /downloads/ shortcut early to avoid overrides in other locations. ### Map /downloads/ shortcut early to avoid overrides in other locations.
### ###
location ^~ /downloads/ { location ^~ /downloads/ {
location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa)$ { location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa)$ {
expires 30d; expires 30d;
tcp_nodelay off; tcp_nodelay off;
access_log off; access_log off;
...@@ -839,7 +839,7 @@ location ^~ /downloads/ { ...@@ -839,7 +839,7 @@ location ^~ /downloads/ {
### Serve & no-log static files & images directly, ### Serve & no-log static files & images directly,
### without all standard drupal rewrites, php-fpm etc. ### without all standard drupal rewrites, php-fpm etc.
### ###
location ~* ^.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|mp3|wav|midi)$ { location ~* ^.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|mp3|wav|midi)$ {
expires 30d; expires 30d;
tcp_nodelay off; tcp_nodelay off;
access_log off; access_log off;
......
...@@ -536,7 +536,7 @@ location ^~ /<?php print $subdir; ?> { ...@@ -536,7 +536,7 @@ location ^~ /<?php print $subdir; ?> {
try_files /<?php print $subdir; ?>/sites/$subdir_main_site_name/files/imagecache/$1 $uri @drupal_<?php print $subdir_loc; ?>; try_files /<?php print $subdir; ?>/sites/$subdir_main_site_name/files/imagecache/$1 $uri @drupal_<?php print $subdir_loc; ?>;
} }
location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa|css|js)$ { location ~* ^.+\.(?:pdf|jpe?g|gif|png|ico|bmp|svg|swf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|class|otf|ttf|woff|eot|less|avi|mpe?g|mov|wmv|mp3|ogg|ogv|wav|midi|zip|tar|t?gz|rar|dmg|exe|apk|pxl|ipa|css|js)$ {
expires 30d; expires 30d;
tcp_nodelay off; tcp_nodelay off;
access_log off; access_log off;
...@@ -709,7 +709,7 @@ location ^~ /<?php print $subdir; ?> { ...@@ -709,7 +709,7 @@ location ^~ /<?php print $subdir; ?> {
### Serve & no-log static files & images directly, ### Serve & no-log static files & images directly,
### without all standard drupal rewrites, php-fpm etc. ### without all standard drupal rewrites, php-fpm etc.
### ###
location ~* ^/<?php print $subdir; ?>/(.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|pdf|docx?|xlsx?|pptx?|tiff?|txt|rtf|cgi|bat|pl|dll|aspx?|class|otf|ttf|woff|eot|less))$ { location ~* ^/<?php print $subdir; ?>/(.+\.(?:jpe?g|gif|png|ico|bmp|svg|swf|pdf|docx?|xlsx?|pptx?|tiff?|txt|rtf|vcard|vcf|cgi|bat|pl|dll|aspx?|class|otf|ttf|woff|eot|less))$ {
expires 30d; expires 30d;
tcp_nodelay off; tcp_nodelay off;
access_log off; access_log off;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment