From 036828a80e7cd8384629a1fba3a2120d7f0775c9 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 6 Feb 2025 12:25:33 +0000 Subject: [PATCH] Handle HEAD requests as well Doesn't hurt to respond to HEAD requests We're handling the same way; clients dont ready body and content is tiny tiny. --- donation-api/src/donation_api/entrypoint.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/donation-api/src/donation_api/entrypoint.py b/donation-api/src/donation_api/entrypoint.py index 60b08cca..f00975c7 100644 --- a/donation-api/src/donation_api/entrypoint.py +++ b/donation-api/src/donation_api/entrypoint.py @@ -27,6 +27,7 @@ async def _(): if conf.merchantid_domain_association: @app.get("/.well-known/apple-developer-merchantid-domain-association") + @app.head("/.well-known/apple-developer-merchantid-domain-association") async def _(): """Used to validate domain ownership with apple/stripe""" return PlainTextResponse( @@ -36,6 +37,7 @@ async def _(): if conf.merchantid_domain_association_txt: @app.get("/.well-known/apple-developer-merchantid-domain-association.txt") + @app.head("/.well-known/apple-developer-merchantid-domain-association.txt") async def _(): """Used to validate domain ownership with apple""" return PlainTextResponse(