Skip to content

Commit b06ed0d

Browse files
authored
Fix favicon media attribute (#1438)
* Fix favicon media attribute * Modify CloudFront rewrite to serve favicons
1 parent 5691cd6 commit b06ed0d

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

frontend/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66

7-
<link rel="icon" href="/favicon.ico" media="(prefers-color-scheme:light), (prefers-color-scheme:no-preference)" />
8-
<link rel="icon" href="/favicon-dark.ico" media="(prefers-color-scheme:dark)" />
7+
<link rel="icon" href="/favicon.ico" media="(prefers-color-scheme: light)" />
8+
<link rel="icon" href="/favicon-dark.ico" media="(prefers-color-scheme: dark)" />
99
<link rel="manifest" href="/site.webmanifest" />
1010

1111
<title>Thunderbird Appointment</title>

pulumi/cloudfront-rewrite.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,19 @@
33
const headers = request.headers;
44
const host = headers.host.value;
55
const apiPath = '/api/v1';
6-
const ignorePaths = ['/fxa', '/assets', '/appointment_logo.svg', '/sitemap.txt'];
6+
const ignorePaths = [
7+
'/fxa',
8+
'/assets',
9+
'/sitemap.txt',
10+
'/favicon.ico',
11+
'/favicon-dark.ico',
12+
'/site.webmanifest',
13+
'/apple-touch-icon.png',
14+
'/android-chrome-192x192.png',
15+
'/android-chrome-512x512.png',
16+
'/favicon-16x16.png',
17+
'/favicon-32x32.png',
18+
];
719
const pathCheckFn = (path) => request.uri.startsWith(path);
820
const domainRewrites = {
921
'apt.mt': 'appointment.tb.pro',

0 commit comments

Comments
 (0)