From be68145c8ee98b0b58cf564854efd303598c07ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Wed, 25 Sep 2024 20:40:48 +0200 Subject: [PATCH] add headers --- passkit_server/lib/src/passkit_server.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/passkit_server/lib/src/passkit_server.dart b/passkit_server/lib/src/passkit_server.dart index 9ac94e5..ab52059 100644 --- a/passkit_server/lib/src/passkit_server.dart +++ b/passkit_server/lib/src/passkit_server.dart @@ -45,7 +45,13 @@ Function getLatestVersion(PassKitBackend backend) { return Response.unauthorized(null); } - return Response.ok(pass.sourceData); + return Response.ok( + pass.sourceData, + headers: { + 'Content-type': 'application/vnd.apple.pkpass', + 'Content-disposition': 'attachment; filename=pass.pkpass', + }, + ); }; }