Special case for instance actor

main
Bob Mottram 2021-08-31 22:02:58 +01:00
parent a69ac4c883
commit e8d59a951b
1 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,11 @@ def signPostHeaders(dateStr: str, privateKeyPem: str,
if not dateStr:
dateStr = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime())
keyID = localActorUrl(httpPrefix, nickname, domain) + '#main-key'
if nickname != domain:
keyID = localActorUrl(httpPrefix, nickname, domain) + '#main-key'
else:
# instance actor
keyID = httpPrefix + '://' + domain + '/actor#main-key'
if not messageBodyJsonStr:
headers = {
'(request-target)': f'post {path}',