Skip to content

Commit

Permalink
Handle HEAD requests as well
Browse files Browse the repository at this point in the history
Doesn't hurt to respond to HEAD requests
We're handling the same way; clients dont ready body and content is tiny tiny.
  • Loading branch information
rgaudin committed Feb 6, 2025
1 parent 6ff3353 commit 036828a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions donation-api/src/donation_api/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 036828a

Please sign in to comment.