Skip to content

Commit 002a110

Browse files
midzerXhmikosR
authored andcommitted
Add calendar filetype (.ics) (#117)
1 parent 1c139fd commit 002a110

File tree

10 files changed

+50
-4
lines changed

10 files changed

+50
-4
lines changed

src/internet_explorer/x-ua-compatible.conf

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

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

src/media_types/character_encodings.conf

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ AddDefaultCharset utf-8
2121
.bbaw \
2222
.css \
2323
.geojson \
24+
.ics \
2425
.js \
2526
.json \
2627
.jsonld \

src/media_types/media_types.conf

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
AddType application/x-chrome-extension crx
7171
AddType application/x-opera-extension oex
7272
AddType application/x-xpinstall xpi
73+
AddType text/calendar ics
7374
AddType text/markdown markdown md
7475
AddType text/vcard vcard vcf
7576
AddType text/vnd.rim.location.xloc xloc

src/security/content-security-policy.conf

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

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

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

src/web_performance/compression.conf

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"image/vnd.microsoft.icon" \
5252
"image/x-icon" \
5353
"text/cache-manifest" \
54+
"text/calendar" \
5455
"text/css" \
5556
"text/html" \
5657
"text/javascript" \

src/web_performance/expires_headers.conf

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
ExpiresByType application/schema+json "access plus 0 seconds"
3232
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
3333
ExpiresByType application/xml "access plus 0 seconds"
34+
ExpiresByType text/calendar "access plus 0 seconds"
3435
ExpiresByType text/xml "access plus 0 seconds"
3536

3637

test/fixtures/test.ics

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
BEGIN:VCALENDAR
2+
VERSION:2.0
3+
METHOD:PUBLISH
4+
X-WR-CALNAME:Feiertage
5+
PRODID:-//s3net//iFeiertage.de 4.0.1//EN
6+
X-WR-CALDESC:Feiertage Bayern
7+
X-APPLE-CALENDAR-COLOR:#B027AE
8+
X-WR-TIMEZONE:Europe/Berlin
9+
CALSCALE:GREGORIAN
10+
BEGIN:VTIMEZONE
11+
TZID:Europe/Berlin
12+
BEGIN:DAYLIGHT
13+
TZOFFSETFROM:+0100
14+
TZOFFSETTO:+0200
15+
DTSTART:19810329T020000
16+
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
17+
TZNAME:CEST
18+
END:DAYLIGHT
19+
BEGIN:STANDARD
20+
TZOFFSETFROM:+0200
21+
TZOFFSETTO:+0100
22+
DTSTART:19961027T030000
23+
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
24+
TZNAME:CET
25+
END:STANDARD
26+
END:VTIMEZONE
27+
BEGIN:VEVENT
28+
UID:DE-IF-1225
29+
DTSTART;VALUE=DATE:20001225
30+
DTEND;VALUE=DATE:20001226
31+
RRULE:FREQ=YEARLY;INTERVAL=1
32+
SUMMARY:1. Weihnachtsfeiertag
33+
DTSTAMP:20000101T000000Z
34+
END:VEVENT
35+
END:VCALENDAR

test/tests.js

+7
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ exports = module.exports = {
225225
}
226226
},
227227

228+
'test.ics': {
229+
responseHeaders: {
230+
'cache-control': 'max-age=0, no-transform',
231+
'content-type': 'text/calendar; charset=utf-8'
232+
}
233+
},
234+
228235
'test.jpeg': {
229236
requestHeaders: {
230237
'origin': 'http://'

0 commit comments

Comments
 (0)