Created
April 14, 2013 00:28
-
-
Save jirutka/5380770 to your computer and use it in GitHub Desktop.
Nginx optimization for WebDAV access from OS X Finder. This config snippet ensures that nginx will ignore requests for useless dot files generated by the Finder (.DS_Store, ._*, …)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Ignore requests for useless dot files generated by OS X Finder (WebDAV). | |
# | |
# This little hack speeds-up a WebDAV access from the Finder significantly and | |
# also prevents messing storage with these annoying files. | |
# | |
location ~ \.(_.*|DS_Store|Spotlight-V100|TemporaryItems|Trashes|hidden)$ { | |
access_log off; | |
error_log off; | |
if ($request_method = PUT) { | |
return 403; | |
} | |
return 404; | |
} | |
location ~ \.metadata_never_index$ { | |
return 200 "Don't index this drive, Finder!"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, just what I needed!