From c81658b9f57e3f46948dc1086d11c99aab31bb18 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sat, 11 Nov 2017 17:34:21 +0100 Subject: [PATCH] Implemented http/2 push --- config.json | 4 ++++ middleware/UserInfo.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 5b4217f2..9d3a60ff 100644 --- a/config.json +++ b/config.json @@ -29,6 +29,10 @@ "scripts": { "main": "main" }, + "push": [ + "/scripts", + "/images/elements/noise-strong.png" + ], "manifest": { "short_name": "notify.moe", "gcm_sender_id": "941298467524", diff --git a/middleware/UserInfo.go b/middleware/UserInfo.go index 2a3e825f..4ea1b564 100644 --- a/middleware/UserInfo.go +++ b/middleware/UserInfo.go @@ -19,7 +19,7 @@ func UserInfo() aero.Middleware { next() // Ignore non-HTML requests - if ctx.IsMediaResponse() { + if aero.IsMediaType(ctx.Response().Header().Get("Content-Type")) { return }