Skip to content

Commit bdfdbce

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

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
@@ -214,6 +214,14 @@ http {
214214
add_header Cache-Control "public, max-age=604800";
215215
}
216216

217+
location = /placeholder.gif {
218+
include snippets/security-headers.conf;
219+
add_header Cross-Origin-Resource-Policy "same-origin" always;
220+
add_header Cache-Control "public, max-age=31536000, immutable";
221+
gzip_static off;
222+
brotli_static off;
223+
}
224+
217225
location = /submit {
218226
client_max_body_size 64k;
219227
client_body_buffer_size 16k;

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)