summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nginx/nginx.conf16
-rwxr-xr-xprocess-static2
-rw-r--r--static/index.html2
-rw-r--r--static/phone.pngbin86912 -> 0 bytes
-rw-r--r--static/pixel-7-pro.svg1
5 files changed, 11 insertions, 10 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 260bc0ab..e39500de 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -81,7 +81,7 @@ http {
aio_write on;
map $uri $preload_resources_uri {
- /index.html ", </phone.png>; rel=preload; as=image, <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}";
+ /index.html ", <{{path|/pixel-7-pro.svg}}>; rel=preload; as=image, <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}";
/faq.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}";
/install/index.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}";
/install/cli.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}";
@@ -116,7 +116,7 @@ http {
}
map $nopush $push_phone {
- 0 /phone.png;
+ 0 "{{path|/pixel-7-pro.svg}}";
}
map $nopush $push_redirect_js {
@@ -322,12 +322,6 @@ http {
add_header Cache-Control "public, max-age=604800";
}
- location = {{path|/mask-icon.svg}} {
- include snippets/security-headers.conf;
- add_header Cross-Origin-Resource-Policy "same-origin" always;
- add_header Cache-Control "public, max-age=31536000, immutable";
- }
-
location = /.well-known/matrix/client {
include snippets/security-headers.conf;
add_header Cross-Origin-Resource-Policy "cross-origin" always;
@@ -448,6 +442,12 @@ http {
add_header Cache-Control "public, max-age=604800";
}
+ location ~ "\.svg$" {
+ include snippets/security-headers.conf;
+ add_header Cross-Origin-Resource-Policy "same-origin" always;
+ add_header Cache-Control "public, max-age=31536000, immutable";
+ }
+
location ~ "\.png$" {
include snippets/security-headers.conf;
# avoid breaking image hotlinking such as https://github.com/TryGhost/Ghost/issues/12880
diff --git a/process-static b/process-static
index db095b49..7ac4e9fe 100755
--- a/process-static
+++ b/process-static
@@ -43,7 +43,7 @@ eslint static-tmp/**/!(fastboot.min.m|z-worker-pako.|pako_inflate.min.|)js
find static-tmp -name '*.js' -exec terser --ecma 2021 --module -cmo {} {} \;
replace=
-for file in static-tmp/**/*.css static-tmp/js/*.js static-tmp/mask-icon.svg; do
+for file in static-tmp/**/*.css static-tmp/js/*.js static-tmp/**/!(bimi|favicon).svg; do
hash=$(sha256sum "$file" | head -c 8)
sri_hash=sha256-$(openssl dgst -sha256 -binary "$file" | openssl base64 -A)
dest="$(dirname $file)/$hash.$(basename $file)"
diff --git a/static/index.html b/static/index.html
index 2ae061da..f44a9f9e 100644
--- a/static/index.html
+++ b/static/index.html
@@ -59,7 +59,7 @@
</div>
<figure class="device-img">
- <img class="phone-img" height="580" src="/phone.png" alt=""/>
+ <img class="phone-img" width="276" height="579" src="{{path|/pixel-7-pro.svg}}" alt=""/>
<img class="phone-logo-img" width="200" height="200" src="{{path|/mask-icon.svg}}" alt=""/>
</figure>
diff --git a/static/phone.png b/static/phone.png
deleted file mode 100644
index 7fcf1fa1..00000000
--- a/static/phone.png
+++ /dev/null
Binary files differ
diff --git a/static/pixel-7-pro.svg b/static/pixel-7-pro.svg
new file mode 100644
index 00000000..11cae528
--- /dev/null
+++ b/static/pixel-7-pro.svg
@@ -0,0 +1 @@
+<svg width="276" height="579" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 0C9.163 0 2 7.163 2 16v547c0 8.837 7.163 16 16 16h240c8.837 0 16-7.163 16-16V16c0-8.837-7.163-16-16-16H18Zm2 6C11.163 6 4 13.163 4 22v537c0 8.837 7.163 16 16 16h236c8.837 0 16-7.163 16-16V22c0-8.837-7.163-16-16-16H20Z" fill="#979A97"/><path fill-rule="evenodd" clip-rule="evenodd" d="M20 3C11.163 3 4 10.164 4 19v541c0 8.837 7.163 16 16 16h236c8.837 0 16-7.163 16-16V19c0-8.837-7.163-16-16-16H20Zm7 7c-8.837 0-16 7.163-16 16v527c0 8.837 7.163 16 16 16h222c8.837 0 16-7.163 16-16V26c0-8.837-7.163-16-16-16H27Z" fill="#000"/><g filter="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 4C11.163 4 4 11.164 4 20v539c0 6.665 4.076 12.379 9.871 14.784C9.16 571 6 565.869 6 560V20c0-8.836 7.163-16 16-16h-2Zm234 0c8.837 0 16 7.163 16 16v540c0 5.869-3.16 11-7.871 13.784C267.924 571.379 272 565.665 272 559V20c0-8.837-7.163-16-16-16h-2Z" fill="#fff"/></g><circle cx="138.5" cy="26.5" r="7.5" fill="#000"/><circle cx="138.5" cy="26.5" r="5.5" fill="#0F1415"/><circle cx="138.5" cy="26.5" r="2.5" fill="#151E1E"/><circle cx="139.5" cy="27.5" r="1.5" fill="#1B2123"/><circle cx="139.5" cy="27.5" r=".5" fill="#3E4749"/><path d="M273 181a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v33a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-33ZM273 252a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v68a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-68Z" fill="#767676"/><defs><filter id="a" x="0" y="0" width="276" height="577.784" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="2" result="effect1_foregroundBlur_6_67"/></filter></defs></svg> \ No newline at end of file