From 71ca5b28880045faeb7267464edfad2c17b852d2 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 28 Apr 2021 13:22:37 +0200 Subject: [PATCH] nginx: use application/octet-stream content-type for WKD routes The format of keys returned on WKD routes is binary, however `application/pgp-keys` is specified to contain keys in ASCII-armored format. The WKD spec says the returned content-type SHOULD be `application/octet-stream`, too. references: https://www.ietf.org/archive/id/draft-koch-openpgp-webkey-service-11.txt https://tools.ietf.org/html/rfc3156#section-7 --- hagrid-routes.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hagrid-routes.conf b/hagrid-routes.conf index add4512..00fe048 100644 --- a/hagrid-routes.conf +++ b/hagrid-routes.conf @@ -110,7 +110,7 @@ location /.well-known/openpgpkey { error_page 429 /errors-static/429-rate-limit-vks-email.htm; error_page 404 /errors-static/404-wkd.htm; - default_type application/pgp-keys; + default_type application/octet-stream; add_header Content-Disposition 'attachment; filename="$2$3$4.asc"'; add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Cache-Control' 'no-cache' always;