From 9581b39a8bf318dc7b3d546fd69ceafaddbb331c Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Wed, 21 Nov 2018 16:52:56 +0000 Subject: [PATCH] Move preload to headers, document --- README.md | 3 +++ config/nginx.conf | 10 ++++++++++ index.html | 4 ---- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 config/nginx.conf diff --git a/README.md b/README.md index cd6d7e5..41623d0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ PassMate is a client-side JavaScript password generator that produces printable password books. It is intended to provide a simplified, somewhat less secure password manager alternative for people who find password managers confusing or prefer paper. There's no server-side code here; it's served entirely as static content. Live version: [passmate.io](https://passmate.io) + +## Web server config +See config/nginx.conf diff --git a/config/nginx.conf b/config/nginx.conf new file mode 100644 index 0000000..ce888e7 --- /dev/null +++ b/config/nginx.conf @@ -0,0 +1,10 @@ +location = /index.html { + http2_push_preload on; + add_header Link "; as=font; rel=preload; crossorigin"; + add_header Link "; as=font; rel=preload; crossorigin"; + add_header Link "; as=font; rel=preload; crossorigin"; + add_header Link "; as=font; rel=preload; crossorigin"; + add_header Link "; as=style; rel=preload"; + add_header Link "; as=script; rel=preload"; + add_header Link "; as=image; rel=preload"; +} diff --git a/index.html b/index.html index 7a87236..e416de3 100644 --- a/index.html +++ b/index.html @@ -5,10 +5,6 @@ PassMate - - - -