Skip to content

Commit 687017f

Browse files
committed
use 1x1 GIF for placeholder image
1 parent fc4a549 commit 687017f

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

nginx/nginx.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,14 @@ http {
311311
add_header Cache-Control "public, max-age=604800";
312312
}
313313

314+
location ~ "\.gif$" {
315+
include snippets/security-headers.conf;
316+
add_header Cross-Origin-Resource-Policy "same-origin" always;
317+
add_header Cache-Control "public, max-age=31536000, immutable";
318+
gzip_static off;
319+
brotli_static off;
320+
}
321+
314322
location ~ "\.png$" {
315323
include snippets/security-headers.conf;
316324
# avoid breaking image hotlinking such as https://github.com/TryGhost/Ghost/issues/12880

static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h1 id="device-integrity-monitoring">
9090
<p>Subscribe a device to regularly submitting attestations to this account by pressing 'Enable remote verification' in the Auditor app menu and scanning the QR code for this account:</p>
9191
<section id="pairing">
9292
<h2><a href="#pairing">Pair devices</a></h2>
93-
<img id="qr" height="300" width="300" alt="" src="/placeholder.png"/>
93+
<img id="qr" height="300" width="300" alt="" src="/placeholder.gif"/>
9494
<button id="rotate">Rotate device subscription key</button>
9595
</section>
9696
<form id="configuration">

static/monitoring.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function toSecurityLevelString(value) {
6262
}
6363

6464
function reloadQrCode() {
65-
qr.src = "/placeholder.png";
65+
qr.src = "/placeholder.gif";
6666
qr.alt = "";
6767
post("/api/account.png", localStorage.getItem("requestToken")).then(response => {
6868
if (!response.ok) {
@@ -456,7 +456,7 @@ for (const logoutButton of document.getElementsByClassName("logout")) {
456456
accountContent.hidden = true;
457457
username.innerText = null;
458458
configuration.reset();
459-
qr.src = "/placeholder.png";
459+
qr.src = "/placeholder.gif";
460460
qr.alt = "";
461461
loggedInButtons.hidden = true;
462462
logout.disabled = false;

static/placeholder.gif

43 Bytes
Loading

static/placeholder.png

-119 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)