Skip to content

Commit 352fb62

Browse files
committed
Add configs for BlackBerry App World files (.bbaw)
Ensure that `.bbaw` text¹ files will: * be served with the `application/x-bb-appworld` media type * have their character encoding specified as `UTF-8` * not be served with any of the `HTML` document related headers * not be compressed (since they only contain a number¹, the application ID, compressing them will only make the file size bigger) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ¹ From: http://docs.blackberry.com/en/developers/deliverables/18168/BlackBerry_Browser-Feature_and_Technical_Overview--1214041-0804111258-001-6.0-US.pdf: `.bbaw` - "A text file that contains the application ID for an application found in the BlackBerry App World™ storefront." - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ref: #43
1 parent 459c0cf commit 352fb62

File tree

11 files changed

+31
-12
lines changed

11 files changed

+31
-12
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### HEAD
2+
3+
* Add configs for BlackBerry App World files (`.bbaw`).
4+
15
### 2.9.0 (October 15, 2014)
26

37
* Update example regarding forcing `https://`

dist/.htaccess

+6-4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Options -MultiViews
128128
# the `X-UA-Compatible` response header should be send only for
129129
# HTML documents and not for the other resources.
130130

131-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
131+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
132132
Header unset X-UA-Compatible
133133
</FilesMatch>
134134

@@ -236,6 +236,7 @@ Options -MultiViews
236236

237237
# Other
238238
AddType application/octet-stream safariextz
239+
AddType application/x-bb-appworld bbaw
239240
AddType application/x-chrome-extension crx
240241
AddType application/x-opera-extension oex
241242
AddType application/x-xpinstall xpi
@@ -259,6 +260,7 @@ AddDefaultCharset utf-8
259260
# Set `UTF-8` as the character encoding for other certain resources.
260261
<IfModule mod_mime.c>
261262
AddCharset utf-8 .atom \
263+
.bbaw \
262264
.css \
263265
.geojson \
264266
.js \
@@ -427,7 +429,7 @@ AddDefaultCharset utf-8
427429
# # the `X-Frame-Options` response header should be send only for
428430
# # HTML documents and not for the other resources.
429431

430-
# <FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
432+
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
431433
# Header unset X-Frame-Options
432434
# </FilesMatch>
433435

@@ -461,7 +463,7 @@ AddDefaultCharset utf-8
461463
# # the `Content-Security-Policy` response header should be send
462464
# # only for HTML documents and not for the other resources.
463465

464-
# <FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
466+
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
465467
# Header unset Content-Security-Policy
466468
# </FilesMatch>
467469

@@ -628,7 +630,7 @@ AddDefaultCharset utf-8
628630
# # the `X-XSS-Protection` response header should be send only for
629631
# # HTML documents and not for the other resources.
630632

631-
# <FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
633+
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
632634
# Header unset X-XSS-Protection
633635
# </FilesMatch>
634636

src/internet_explorer/x-ua-compatible.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# the `X-UA-Compatible` response header should be send only for
2222
# HTML documents and not for the other resources.
2323

24-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
24+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
2525
Header unset X-UA-Compatible
2626
</FilesMatch>
2727

src/media_types_and_character_encodings/character_encodings.conf

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ AddDefaultCharset utf-8
99
# Set `UTF-8` as the character encoding for other certain resources.
1010
<IfModule mod_mime.c>
1111
AddCharset utf-8 .atom \
12+
.bbaw \
1213
.css \
1314
.geojson \
1415
.js \

src/media_types_and_character_encodings/media_types.conf

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282

8383
# Other
8484
AddType application/octet-stream safariextz
85+
AddType application/x-bb-appworld bbaw
8586
AddType application/x-chrome-extension crx
8687
AddType application/x-opera-extension oex
8788
AddType application/x-xpinstall xpi

src/security/content-security-policy.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# the `Content-Security-Policy` response header should be send
2727
# only for HTML documents and not for the other resources.
2828

29-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
29+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
3030
Header unset Content-Security-Policy
3131
</FilesMatch>
3232

src/security/x-frame-option.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# the `X-Frame-Options` response header should be send only for
4141
# HTML documents and not for the other resources.
4242

43-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
43+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
4444
Header unset X-Frame-Options
4545
</FilesMatch>
4646

src/security/x-xss-protection.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# the `X-XSS-Protection` response header should be send only for
4444
# HTML documents and not for the other resources.
4545

46-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
46+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
4747
Header unset X-XSS-Protection
4848
</FilesMatch>
4949

test/fixtures/.htaccess

+6-4
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Options -MultiViews
108108
# the `X-UA-Compatible` response header should be send only for
109109
# HTML documents and not for the other resources.
110110

111-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
111+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
112112
Header unset X-UA-Compatible
113113
</FilesMatch>
114114

@@ -216,6 +216,7 @@ Options -MultiViews
216216

217217
# Other
218218
AddType application/octet-stream safariextz
219+
AddType application/x-bb-appworld bbaw
219220
AddType application/x-chrome-extension crx
220221
AddType application/x-opera-extension oex
221222
AddType application/x-xpinstall xpi
@@ -239,6 +240,7 @@ AddDefaultCharset utf-8
239240
# Set `UTF-8` as the character encoding for other certain resources.
240241
<IfModule mod_mime.c>
241242
AddCharset utf-8 .atom \
243+
.bbaw \
242244
.css \
243245
.geojson \
244246
.js \
@@ -394,7 +396,7 @@ AddDefaultCharset utf-8
394396
# the `X-Frame-Options` response header should be send only for
395397
# HTML documents and not for the other resources.
396398

397-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
399+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
398400
Header unset X-Frame-Options
399401
</FilesMatch>
400402

@@ -428,7 +430,7 @@ AddDefaultCharset utf-8
428430
# the `Content-Security-Policy` response header should be send
429431
# only for HTML documents and not for the other resources.
430432

431-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
433+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
432434
Header unset Content-Security-Policy
433435
</FilesMatch>
434436

@@ -595,7 +597,7 @@ AddDefaultCharset utf-8
595597
# the `X-XSS-Protection` response header should be send only for
596598
# HTML documents and not for the other resources.
597599

598-
<FilesMatch "\.(appcache|atom|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
600+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
599601
Header unset X-XSS-Protection
600602
</FilesMatch>
601603

test/fixtures/test.bbaw

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
123456

test/tests.js

+8
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ exports = module.exports = {
9292
}
9393
},
9494

95+
'test.bbaw': {
96+
responseHeaders: {
97+
'cache-control': 'max-age=2592000, no-transform',
98+
'content-encoding': null,
99+
'content-type': 'application/x-bb-appworld; charset=utf-8'
100+
}
101+
},
102+
95103
'test.crx': {
96104
responseHeaders: {
97105
'content-encoding': null,

0 commit comments

Comments
 (0)