Skip to content

Commit a795fff

Browse files
committed
Add configs for cursor images (.cur)
Apply all the configs used for `.ico` files to `.cur` files as the two image formats are almost identical. The MIME type for the `.cur` file doesn't matter as browsers seem to sniff the content. However, `image/x-icon` is specified because it's the one usually used for `.ico` file and because it's shorther then the other frequentlly used one (`image/vnd.microsoft.icon`), making the header size smaller. See also: * http://en.wikipedia.org/wiki/ICO_%28file_format%29 * http://msdn.microsoft.com/en-us/library/windows/desktop/ms648007%28v=vs.85%29.aspx Ref: h5bp/server-configs-nginx#5.
1 parent 8057f17 commit a795fff

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.htaccess

+5-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<IfModule mod_setenvif.c>
3434
<IfModule mod_headers.c>
35-
<FilesMatch "\.(gif|ico|jpe?g|png|svgz?|webp)$">
35+
<FilesMatch "\.(cur|gif|ico|jpe?g|png|svgz?|webp)$">
3636
SetEnvIf Origin ":" IS_CORS
3737
Header set Access-Control-Allow-Origin "*" env=IS_CORS
3838
</FilesMatch>
@@ -92,7 +92,7 @@ Options -MultiViews
9292
Header set X-UA-Compatible "IE=edge"
9393
# `mod_headers` can't match based on the content-type, however, we only
9494
# want to send this header for HTML pages and not for the other resources
95-
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
95+
<FilesMatch "\.(appcache|crx|css|cur|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
9696
Header unset X-UA-Compatible
9797
</FilesMatch>
9898
</IfModule>
@@ -159,6 +159,7 @@ Options -MultiViews
159159
AddType application/x-xpinstall xpi
160160
AddType application/xml atom rdf rss xml
161161
AddType image/webp webp
162+
AddType image/x-icon cur
162163
AddType text/cache-manifest appcache manifest
163164
AddType text/vtt vtt
164165
AddType text/x-component htc
@@ -270,7 +271,7 @@ AddDefaultCharset utf-8
270271

271272
# <IfModule mod_headers.c>
272273
# Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
273-
# <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
274+
# <FilesMatch "\.(appcache|crx|css|cur|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
274275
# Header unset Content-Security-Policy
275276
# </FilesMatch>
276277
# </IfModule>
@@ -458,7 +459,7 @@ FileETag None
458459
ExpiresByType application/xml "access plus 0 seconds"
459460
ExpiresByType text/xml "access plus 0 seconds"
460461

461-
# Favicon (cannot be renamed!)
462+
# Favicon (cannot be renamed!) and cursor images
462463
ExpiresByType image/x-icon "access plus 1 week"
463464

464465
# HTML components (HTCs)

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### HEAD
22

3+
* Add configurations for cursor images (`.cur`).
34
* Fix backup and source file blocking for Apache v2.3+ ([#5](https://github.com/h5bp/server-configs-apache/issues/5)).
45
* Remove filename extension to content type mappings that are already provided by Apache v2.2.0+ ([#4](https://github.com/h5bp/server-configs-apache/issues/4)).
56
* Improve inline comments.

0 commit comments

Comments
 (0)