Last active
August 29, 2015 14:09
-
-
Save lrvick/20c8adb547eb2a29b396 to your computer and use it in GitHub Desktop.
Nginx conditions to deny *.appcache files to IOS7 users to avoid their severe bugs.
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
# If IOS7 sees a *.appcache file it freaks out and disables browser | |
# history until browser cache is cleared AND it is rebooted. | |
# Tell IOS7 users asking for a *.appcache file to GTFO with a 412 | |
# "precondition failed" response so they don't hurt themselves. | |
if ( $http_user_agent ~* '(iPad|iPhone);.*CPU.*OS 7_' ){ | |
set $test IOS7; | |
} | |
if ($request_filename ~* ^.+.appcache$) { | |
set $test "${test}_APPCACHE"; | |
} | |
if ($test = IOS7_APPCACHE){ | |
return 412; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1